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

Interval Server Error 500 when exporting Datumaro 1.0 Annotations #8901

Open
2 tasks done
PrithiPal opened this issue Jan 7, 2025 · 0 comments
Open
2 tasks done

Interval Server Error 500 when exporting Datumaro 1.0 Annotations #8901

PrithiPal opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@PrithiPal
Copy link

PrithiPal commented Jan 7, 2025

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

Using CVAT API export annotations endpoint to retrieve annotations. Below are the logs from cvat_server docker service. The request URL is GET /api/tasks/1046/annotations?org=&use_default_location=true&format=Datumaro+1.0 HTTP/1.0

2025-01-06 23:58:40,186 DEBG 'uvicorn-1' stdout output:
INFO:     10.58.43.22:0 - "GET /api/tasks/1046/annotations?org=&use_default_location=true&format=Datumaro+1.0 HTTP/1.0" 500 Internal Server Error

Followed by

2025-01-06 23:58:40,909 DEBG 'uvicorn-1' stderr output:
[2025-01-06 23:58:40,908] ERROR django.request: Internal Server Error: /api/tasks/1046/annotations
Traceback (most recent call last):
  File "/opt/venv/lib/python3.10/site-packages/asgiref/sync.py", line 518, in thread_handler
    raise exc_info[1]
  File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = await get_response(request)
  File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
    response = await wrapped_callback(
  File "/opt/venv/lib/python3.10/site-packages/asgiref/sync.py", line 468, in __call__
    ret = await asyncio.shield(exec_coro)
  File "/opt/venv/lib/python3.10/site-packages/asgiref/current_thread_executor.py", line 40, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/opt/venv/lib/python3.10/site-packages/asgiref/sync.py", line 522, in thread_handler
    return func(*args, **kwargs)
  File "/opt/venv/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
    return view_func(*args, **kwargs)
  File "/opt/venv/lib/python3.10/site-packages/rest_framework/viewsets.py", line 124, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/django/cvat/apps/engine/views.py", line 1521, in annotations
    return self.export_dataset_v1(
  File "/home/django/cvat/apps/engine/mixins.py", line 433, in export_dataset_v1
    return dataset_export_manager.export()
  File "/home/django/cvat/apps/engine/background.py", line 405, in export
    if response := self.handle_rq_job(rq_job, queue):
  File "/home/django/cvat/apps/engine/background.py", line 123, in handle_rq_job
    return self._handle_rq_job_v1(rq_job, queue)
  File "/home/django/cvat/apps/engine/background.py", line 332, in _handle_rq_job_v1
    if osp.exists(file_path) and not is_result_outdated():
  File "/home/django/cvat/apps/engine/background.py", line 231, in is_result_outdated
    return rq_job.meta[RQJobMetaField.REQUEST]["timestamp"] < instance_update_time
KeyError: 'request'

Expected Behavior

The Response should ideally return a JSON object in shape of Format ( Datumaro 1.0 in my case ) in the request.

Possible Solution

Fixing the underlying bug in this version, or revert to last known version to export correctly.

Context

There are tasks created through older version of CVAT 2.14.0 and I upgraded recently to 2.24.0
Using CVAT Version 2.24.0

Environment

1. I'm hosting all cvat core services  + auxiliary services ( Redis + Clickhouse + KV Rocks ) locally + DB ( Postgres on cloud ) 
2. The script requesting API is in different box however in the same network as CVAT Services.
3. The whole workflow: 
   CVAT Action --> Event Trigger --> Webhook to my Script --> API Request for latest Annotations --> Internal Server error on `cvat_server` service --> Error in by Script.
@PrithiPal PrithiPal added the bug Something isn't working label Jan 7, 2025
@PrithiPal PrithiPal changed the title Internval Server Error 500 when exporting Datumaro 1.0 Annotations Interval Server Error 500 when exporting Datumaro 1.0 Annotations Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

2 participants