label-studio icon indicating copy to clipboard operation
label-studio copied to clipboard

runtime error when trying to delete an annotation if sorting is not default

Open nadjet opened this issue 2 years ago • 3 comments

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 photo_2022-07-05_15-13-13

Steps to reproduce the behavior:

  1. Order the items in your project by some data field
  2. Select an item with a completed annotation in your project (tick the ID)
  3. Select "DELETE ANNOTATIONS" under the "Task" dropdown to delete the annotation you selected
  4. You should get an error like in the attached screenshot
  5. To enable deletion, you should reverse to Default order, then the error disappears.

nadjet avatar Jul 05 '22 13:07 nadjet

@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.

triklozoid avatar Jul 08 '22 07:07 triklozoid

@nadjet are you using LS from github repo? or from pip? Please try the latest version (1.5.0post0) from pip.

makseq avatar Jul 14 '22 11:07 makseq

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:

  1. Annotate an image with bounding box and submit
  2. Go back to list of tasks and order by some column like "completed by"
  3. Select annotated image by ticking its ID
  4. Select under dropdown "Tasks" "Delete Annotations" to delete the image annotation.
  5. You will get the error, though the annotation will actually delete itself.

files.zip

nadjet avatar Jul 19 '22 09:07 nadjet

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:

image

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 avatar Dec 16 '22 13:12 WillieMaddox

@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.

makseq avatar Dec 22 '22 02:12 makseq

Upgraded to v1.7.0 last week and have not been able to reproduce the error since.

WillieMaddox avatar Jan 12 '23 00:01 WillieMaddox

As I remember we've fixed it some time ago.

makseq avatar Jan 16 '23 01:01 makseq