Skip to content

[BUG] Endless loop when calling annotate() with CVAT backend #6357

@jgugglberger

Description

@jgugglberger

Describe the problem

When calling annotate with CVAT backend I am sometimes ending up in an endless loop. This happens when the CVAT task was created successfully, but no job is created (i am not sure how to reproduce this in CVAT).

I located the endless loop in the file cvat.py line 4454. For myself i made the quickfix to just break the loop after X amount of polling tries.

Code to reproduce issue

Annotate with CVAT Backend.

view.annotate(
    "test",
    label_field=f"ground_truth",
    launch_editor=False,
    project_name="test",
    organization="test",
    task_name="test",
    task_size=50,
)

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 22.04): Ubuntu 22.04
  • Python version (python --version): 3.10
  • FiftyOne version (fiftyone --version): 2.8.2
  • FiftyOne installed from (pip or source): pip

Other info/logs

Thats the log i get in CVAT:

2025-09-25 15:23:50.141	
PIL.UnidentifiedImageError: cannot identify image file '/home/django/data/data/4049/raw/b31022e76eba1e30a441b2548cebb089.jpg'
2025-09-25 15:23:50.141	
    raise UnidentifiedImageError(msg)
2025-09-25 15:23:50.141	
  File "/opt/venv/lib/python3.10/site-packages/PIL/Image.py", line 3532, in open
2025-09-25 15:23:50.141	
    img = Image.open(image, mode='r')
2025-09-25 15:23:50.141	
  File "/home/django/utils/dataset_manifest/core.py", line 200, in _get_img_properties
2025-09-25 15:23:50.141	
    yield self._get_img_properties(image)
2025-09-25 15:23:50.141	
  File "/home/django/utils/dataset_manifest/core.py", line 233, in __iter__
2025-09-25 15:23:50.141	
    for image_properties in iterable_obj:
2025-09-25 15:23:50.141	
  File "/home/django/utils/dataset_manifest/core.py", line 620, in _write_core_part
2025-09-25 15:23:50.141	
    self._write_core_part(manifest_file, obj, _tqdm)
2025-09-25 15:23:50.141	
  File "/home/django/utils/dataset_manifest/core.py", line 631, in create
2025-09-25 15:23:50.141	
    manifest.create()
2025-09-25 15:23:50.141	
  File "/home/django/cvat/apps/engine/task.py", line 1114, in _create_thread
2025-09-25 15:23:50.141	
    return func(*args, **kwds)
2025-09-25 15:23:50.141	
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
2025-09-25 15:23:50.141	
    result = self.func(*self.args, **self.kwargs)
2025-09-25 15:23:50.141	
  File "/opt/venv/lib/python3.10/site-packages/rq/job.py", line 1317, in _execute
2025-09-25 15:23:50.141	
    self._result = self._execute()
2025-09-25 15:23:50.141	
  File "/opt/venv/lib/python3.10/site-packages/rq/job.py", line 1280, in perform
2025-09-25 15:23:50.141	
    rv = job.perform()
2025-09-25 15:23:50.141	
  File "/opt/venv/lib/python3.10/site-packages/rq/worker.py", line 1431, in perform_job
2025-09-25 15:23:50.141	
Traceback (most recent call last):
2025-09-25 15:23:50.141	
[2025-09-25 13:23:50,141] ERROR rq.worker: [Job create:task-4069]: exception raised while executing (cvat.apps.engine.task._create_thread)

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently
  • Yes. I would be willing to contribute a fix for this bug with guidance
    from the FiftyOne community
  • No. I cannot contribute a bug fix at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions