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

Partial upload of AnnotationCollection makes client crash #9

Open
waliens opened this issue Dec 18, 2018 · 2 comments
Open

Partial upload of AnnotationCollection makes client crash #9

waliens opened this issue Dec 18, 2018 · 2 comments

Comments

@waliens
Copy link

waliens commented Dec 18, 2018

When one annotation in an AnnotationCollection makes the upload fails, the server returns an 206 HTTP response (partial content). The client handles this as an error but fails to log the message as there is no error field in the returned json. This results in an exception being raised.

See code in cytomine.py at line 346.

@waliens waliens changed the title Partial upload of AnnotationCollaction makes client crash Partial upload of AnnotationCollection makes client crash Dec 18, 2018
@urubens
Copy link

urubens commented Dec 18, 2018

Beyond the bug, which should be the appropriate behavior when the server returns a 206 HTTP response ? Log an info message for correctly added objects, and an error message for others ?

By the way the response for multiple adds in the same request should be definitely improved in Cytomine-core.

@waliens
Copy link
Author

waliens commented Dec 18, 2018

I would say yes for logging the successes and errors !
Additionally, we could raise an exception with a failed attribute that would contain a collection with the objects that couldn't be uploaded ?

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