Kitware / UPennContrast

UPenn ?
https://upenn-contrast.netlify.com/
Apache License 2.0
8 stars 6 forks source link

Color selected #760

Closed bruyeret closed 2 months ago

bruyeret commented 3 months ago

You need to rebuild girder because of the addition of an endpoint to edit multiple annotations at the same time

Close #750

bruyeret commented 2 months ago

Oh yes, I didn't think about it. I made the color mandatory, but it can be null.

When you update an annotation, it finds the annotation with this ID, do the changes you asked for, and validate the new annotation. If it didn't have a color property, then the new annotation won't have a color either, hence the validation error.

So this error could happen:

We could discuss a solution on Friday 👍

bruyeret commented 2 months ago

It should all work fine now! I made it compatible with the old annotations that don't have a color @arjunrajlab

arjunrajlab commented 2 months ago

So I'm still getting this error:

[2024-09-05 15:49:31,299: WARNING/ForkPoolWorker-16] girder_client.HttpError: HTTP error 400: POST http://girder:8080/api/v1//upenn_annotation/multiple
Response text: {"message": "data must contain ['color'] properties", "type": "validation"}

I pulled the branch and rebuilt the worker (this was the cellpose worker). And I rebuilt girder. Is there something else I could be missing?

bruyeret commented 2 months ago

Did you pull correctly? I forced push, so you could have issues with that I am sure that the validation doesn't need a color anymore, I even specified it in a comment:

# color is optional (legacy, equivalent to null)
bruyeret commented 2 months ago

You can:

git fetch
git reset origin/color-selected --hard
bruyeret commented 2 months ago

And then rebuild girder

arjunrajlab commented 2 months ago

That worked, thank you!