-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Could not save annotations #2157
Comments
Looks like quite serious issue, but unfortunately we rarely meet it and reproducing (to get root cause) isn't simple. |
By the way, when you press |
@mfruhner , Was the issue resolved? |
No, as @bsekachev mentioned, the unsaved annotations were not exported in the dataset. Greetings, Maik |
I am getting the same error using the REST API when trying to create a new track using a subset of the shapes of an existing track. Here's the output from my cvat logs: 2020-09-25 13:33:11,828 DEBG 'runserver' stderr output: 2020-09-25 13:33:11,829 DEBG 'runserver' stderr output: |
It seems like CVAT got itself into a bad state. I can not create any new shapes. This includes new annotations or new key frames to existing tracks. This is through both the GUI and the REST interface. I have tried rebooting the machine and still no luck. Moving/resizing existing shapes seems to work fine. |
|
@bsekachev thanks for the response. I was not populating the id field. After posting the message I realized my issue is more general and I can not add any new annotations or key frames to existing annotations (either through the GUI or REST interface). It looks to be in a bad state (possibly because a network failure while adding annotations). |
@bsekachev |
It looks like I can repeatedly reproduce this behavior when adding a large track (one shape per frame), containing over 70k+ frames, via the REST API. |
Could you please share a code snippet to reproduce this issue? |
Attached is a JSON formatted message that was sent via the REST API (PUT The associated video file has 23635 frames and its dimensions are 1280 x 480. |
Hi, @vinayshah01 I do not see anything suspicious in the JSON you provided. I expected to see trying to save an object in If this body causes the issue, I think it means that something wrong happens with server during saving. |
I also twice encountered this issue when uploading annotations through the CLI. The tasks I am working on are single job with 300 frames. I upload the annotations in CVAT XML-format with tracked shapes. I did however, write the code for converting my model-output to CVAT-XML myself, so there might be errors with the uploaded file. However, I have only encountered the error in 2 out of 18 videos so far so it is not necessarily reproduceable. I am not doing the actual annotation work myself, could there be any sort of user-error that produces this issue? Also, is the currently recommended workaround to set a frequent auto-save and just reload the page whenever the error occurs? I upload the annotation file I used here in case there is any obvious error on that part |
We are also experiencing this problem when modifying a pre-loaded CVAT For Videos 1.1 xml annotation file. b.t.w, I noticed that the auto-save setting resets to 15 minutes every time the page refreshes. Is that in purpose? |
Yes, settings are saved during client session only. |
@bsekachev Hi, I met the same problem, I sometimes encounter code 400 when saving. CVAT version 1.0. From the error message, I searched for information and found that is it might be related to PostgreSQL? |
@kondrusrividya try to login CVAT in a new browser tab |
I did open cvat in new tab by leaving current tab open but lot of work is not there in the new tab. Is there any way to save my work without loosing |
Just login in the new tab, switch to the old tab and try to save. |
No use . Same error 401. |
Are there any update for this issue? |
We still cannot reproduce it on our side. Need detailed steps. |
I have not been able to resolve the issue. It seems to occur less frequently if client (browser) /server are on the same machine, but this is just be based on anecdotal evidence. It is difficult to reproduce since the same steps which caused it to fail once may not cause it to fail when tried again. It maybe due to some psuedo-random event (dropped packet?) which then corrupts the database. It maybe possible to induce this state by repeatedly updating annotations via the REST API (see attached example request from Oct 15, 2020) until a failure occurs. My only means of mitigation is to remove the docker volumes (docker volume rm $(docker volume ls -q) and rebuild with docker-compose. |
Hi everyone, this error happens to us frequently when we press undo then redo inside an annotation task. Could you try to label an annotation task, press undo and then redo? It should be able to reproduce this error if you use undo and redo multiple times. |
Hi @leeyh20 I tried undo/redo several times, but it was not reprosed. Would be great if you can make a gif screencast with the issue, opening job after refreshing a page, doing something and reproducing the error |
I can reproduce this error message consistently in browser by doing the following steps:
Trying to save after following these steps produces the error message. |
I was able to consistently reproduce this error by following these steps. I am running CVAT release 1.7.0 on macOS 13.3.1. I have also seen this error when running on desktop Ubuntu 21.10. |
Same, I am able to reproduce the error when I press Undo after deleting a label |
My actions before raising this issue
Expected Behaviour
The annotations are saved without a problem
Current Behaviour
A popup appears with the following message:
Could not save annotations
Error: Request failed with status code 400. "duplicate key value violates unique constraint "engine_trackedshape_pkey"\nDETAIL: Key (id)=(113) already exists.\n".
Steps to Reproduce (for bugs)
I am annotating a video with the tracking bounding boxes. When trying to save mid way through, the error appears.
Context
I am not able to save any annotations. All my work will be lost, when I close the window. When opening the job in a 2nd window it show the last save was 400 frames ago.
Edit: I was able to "save" my work by downloading the annotation via the "Menu" -> "Dump annotations" / "Export Dataset" Buttons.
Your Environment
git log -1
): cb4d8e6docker version
(e.g. Docker 17.0.05): 19.03.52020-09-09 07:05:44,580 DEBG 'runserver' stderr output:
[Wed Sep 09 07:05:44.580126 2020] [wsgi:error] [pid 630:tid 139984631072512] [remote 172.28.0.7:54352] WARNING:django.request:Bad Request: /api/v1/jobs/2/annotations
The text was updated successfully, but these errors were encountered: