label-studio
label-studio copied to clipboard
runtime error when trying to delete an annotation if sorting is not default
Describe the bug After sorting the items in the project by some data field, I select a row and select "Delete annotation": I get a runtime error: "Cannot resolve keyword 'ordering_field' into field (see attached screenshot).
To Reproduce
Steps to reproduce the behavior:
- Order the items in your project by some data field
- Select an item with a completed annotation in your project (tick the ID)
- Select "DELETE ANNOTATIONS" under the "Task" dropdown to delete the annotation you selected
- You should get an error like in the attached screenshot
- To enable deletion, you should reverse to Default order, then the error disappears.
@nadjet can you share your task example? I tested on this one and didn't see the error:
[
{
"data": {
"text": "Calif. wildfires signal the arrival of a planetary fire age https://t.co/Vvo9noqQfA"
}
}
]
Also full traceback would be helpful.
@nadjet are you using LS from github repo? or from pip? Please try the latest version (1.5.0post0) from pip.
Sorry for not answering earlier. I was able to reproduce the error locally by installing the latest version 1.5.0post0 with pip 3.9. With version 1.4 I had on my laptop, I could not reproduce the error. I send you an xml with the labelling code and an example json. The task is image bounding box. The steps are as I described above:
- Annotate an image with bounding box and submit
- Go back to list of tasks and order by some column like "completed by"
- Select annotated image by ticking its ID
- Select under dropdown "Tasks" "Delete Annotations" to delete the image annotation.
- You will get the error, though the annotation will actually delete itself.
Same problem here. Ubuntu 20.04, Python v3.8, pip install into fresh virtualenv, LS v1.6.0.
For me, it's happening when I try to delete the image prediction.
Update:
Seems to only happen when you try to batch delete 1 or more Annotations when at the same time you have a filter applied on Annotations such that deleting the Annotation triggers the filter.
So for example, say I have the following filter set:
If I delete a annotation from a task, that task no satisfies the filter rule and the runtime error is raised. Same thing for Predictions.
@WillieMaddox Could you show the screenshot with the error? And also logs from your console. I couldn't reproduce it with the latest develop branch.
Upgraded to v1.7.0 last week and have not been able to reproduce the error since.
As I remember we've fixed it some time ago.