Skip to content

Sending image to remote server causes PIL.UnidentifiedImageerror  #2

@FabianaMoresi

Description

@FabianaMoresi

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions