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

Annotation dumps failing on mask, even using example code #52

Open
dmurphree opened this issue Oct 11, 2022 · 0 comments
Open

Annotation dumps failing on mask, even using example code #52

dmurphree opened this issue Oct 11, 2022 · 0 comments

Comments

@dmurphree
Copy link

Hello,

Using the example code get_annotations.py I am seeing repeatable dump failures for about 50% of the annotations in a current project, while the others dump just fine.

The errors seem to always be on the masks (the crops download fine), and are either:
500 Internal Server Error
502 Bad Gateway

Here is an example:

#crop downloads successfully:
[2022-10-11 08:48:42,065][INFO] File downloaded successfully from http://redacted.computer.name/api/userannotation/1539856/crop.jpg with parameters {'maxSize': 512, 'bits': 8, 'complete': True}

#mask fails with Bad Gateway:
[2022-10-11 08:48:42,087][INFO] [GET] http://redacted.computer.name/api/userannotation/1539856/mask.jpg | 502 Bad Gateway
Traceback (most recent call last):
File "redacted/get_annotations.py", line 139, in
annotation.dump(dest_pattern=os.path.join(params.download_path, "{project}", "mask", "{id}.jpg"), mask=True, max_size=512)
File "redacted/cytomine/models/annotation.py", line 133, in dump
files = generic_image_dump(dest_pattern, self, dump_url_fn, override=override, **parameters)
File "redacted/cytomine/models/_utilities/dump.py", line 62, in generic_image_dump
raise DumpError("Could not dump the image.")
cytomine.models._utilities.dump.DumpError: Could not dump the image.

I am using Cytomine 3.0.0 , Python 3.9.7

Any thoughts on what might be wrong? Crops download fine for all annotations, even the half that the masks fail on.

Thanks!

Dennis

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

1 participant