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

Error when trying to export task dataset (AssertionError) #7097

Closed
2 tasks done
ragahdtareg opened this issue Nov 5, 2023 · 10 comments
Closed
2 tasks done

Error when trying to export task dataset (AssertionError) #7097

ragahdtareg opened this issue Nov 5, 2023 · 10 comments
Labels
bug Something isn't working good first issue Good for newcomers need info Need more information to investigate the issue

Comments

@ragahdtareg
Copy link

Actions before raising this issue

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

Steps to Reproduce

I am trying to export data set in YOLO 1.1 format but I faced the error multiple times, I can't export task dataset

Expected Behavior

This is the error showing everytime I tried to export task dataset

Could not export dataset for the task 19

Error: Request failed with status code 500. "AssertionError\n".

Possible Solution

No response

Context

This issue blocked me a long time from my work, i need to solve it right now please.

Environment

Server version: 2.8.0

Core version: 11.1.0

Canvas version: 2.17.5

UI version: 1.56.1
@ragahdtareg ragahdtareg added the bug Something isn't working label Nov 5, 2023
@bsekachev
Copy link
Member

How can we reproduce the issue?

@bsekachev bsekachev added the need info Need more information to investigate the issue label Nov 6, 2023
@zhiltsov-max
Copy link
Contributor

Hi, please attach logs from the command output: docker logs cvat_worker_export.

@kedarps
Copy link

kedarps commented Nov 7, 2023

We are facing the same error. We have a simple object detection task and export using the 'CVAT for images 1.1' works, but using 'PASCAL VOC 1.1' gives AssertionError. Here is the log:

2023-11-07 15:09:03,945 DEBG 'rqworker-export-1' stderr output:
[2023-11-07 15:09:03,944] ERROR cvat.apps.dataset_manager.views: [Job.id=2] [cvat.apps.dataset_manager.views @ export]: exception occurred
Traceback (most recent call last):
  File "/home/django/cvat/apps/dataset_manager/views.py", line 85, in export
    export_fn(db_instance.id, temp_file, dst_format,
  File "/home/django/cvat/apps/dataset_manager/task.py", line 855, in export_job
    job.export(f, exporter, host=server_url, save_images=save_images)
  File "/home/django/cvat/apps/dataset_manager/task.py", line 685, in export
    exporter(dst_file, temp_dir, job_data, **options)
  File "/home/django/cvat/apps/dataset_manager/formats/registry.py", line 36, in __call__
    f_or_cls(*args, **kwargs)
  File "/home/django/cvat/apps/dataset_manager/formats/pascal_voc.py", line 23, in _export
    dataset = Dataset.from_extractors(GetCVATDataExtractor(
  File "/home/django/cvat/apps/dataset_manager/bindings.py", line 1614, in GetCVATDataExtractor
    return CvatTaskOrJobDataExtractor(instance_data, **kwargs)
  File "/home/django/cvat/apps/dataset_manager/bindings.py", line 1388, in __init__
    self._categories = self._load_categories(instance_meta['labels'])
  File "/home/django/cvat/apps/dataset_manager/bindings.py", line 1332, in _load_categories
    label_id = label_categories.add(label['name'], label.get('parent'))
  File "/opt/venv/lib/python3.10/site-packages/datumaro/components/annotation.py", line 161, in add
    assert key not in self._indices
AssertionError

@zhiltsov-max
Copy link
Contributor

@kedarps, do you know how we can reproduce the problem? A task backup or task label configuration would be helpful.

@kedarps
Copy link

kedarps commented Nov 8, 2023

Yes sure, here is the Task Backup zip file:
ObjDetect_TaskBackup.zip

@PMazarovich
Copy link
Contributor

PMazarovich commented Nov 15, 2023

@bsekachev we have the same for custom format
the thing is that you're allowed to export annotations in cvat for video format, import this file to another task and then when trying to export annotations from new task - assertion error.
Interesting stuff: you may backup this new task and restore from backup without errors.
I can provide a file if needed

@zhiltsov-max zhiltsov-max added the good first issue Good for newcomers label Mar 19, 2024
@azhavoro
Copy link
Contributor

azhavoro commented Sep 6, 2024

The problem seems to have been resolved in one of the releases. The only provided example of a task with incorrect export is correctly exported in Yolo format for now

@azhavoro azhavoro closed this as completed Sep 6, 2024
@PMazarovich
Copy link
Contributor

@azhavoro , this is not resolved. I will create a new issue

@PMazarovich
Copy link
Contributor

#8411

@zhiltsov-max
Copy link
Contributor

It seems that there were 2 or 3 different errors in this discussion:

  1. The one reported initially and also maybe by @PMazarovich.
    It seems to be related to Cannot export task (AssertionError) Due to invalid tracks #6779

  2. Error when trying to export task dataset (AssertionError) #7097 (comment)

We are facing the same error. We have a simple object detection task and export using the 'CVAT for images 1.1' works, but using 'PASCAL VOC 1.1' gives AssertionError. Here is the log: ...

It should have been fixed in #8262.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers need info Need more information to investigate the issue
Projects
None yet
Development

No branches or pull requests

6 participants