Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending image to remote server causes PIL.UnidentifiedImageError #2

Open
FabianaMoresi opened this issue Jun 20, 2023 · 2 comments
Open

Comments

@FabianaMoresi
Copy link

Hi, thanks for your repository!

I managed to install everything on an Amazon EC2 instance with absolutely no problem.
However, after adding the remote server URL in the QuPath extension, the server fails with the following stacktrace:

File "/home/ec2-user/anaconda3/envs/cellsparse-api/lib/python3.11/site-packages/cellsparse_api/main.py", line 30, in decode_image
    return np.array(Image.open(io.BytesIO(base64.b64decode(b64data))))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ec2-user/anaconda3/envs/cellsparse-api/lib/python3.11/site-packages/PIL/Image.py", line 3298, in open
    raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f0f6a05d6c0>

I'm trying to figure out if this is a problem of the extension or of the API server. Can you help? Thanks!

PS: cross-posted to ksugar/cellsparse-api issue#2

@ksugar
Copy link
Owner

ksugar commented Jul 2, 2023

I replied to it in the other thread. We will continue the discussion there.

ksugar/cellsparse-api#2 (comment)

@ksugar ksugar closed this as completed Jul 2, 2023
@ksugar
Copy link
Owner

ksugar commented Jul 2, 2023

I will leave it open until the issue is solved.

@ksugar ksugar reopened this Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants