cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
11.9k stars 2.9k forks source link

Cannot to create a task from a backup #6149

Open azhavoro opened 1 year ago

azhavoro commented 1 year ago

My actions before raising this issue

Steps to Reproduce (for bugs)

  1. Create a task from share
  2. Backup the task
  3. Try to create a task from the backup on new instance

Expected Behaviour

Current Behaviour

Traceback (most recent call last):
  File "/opt/venv/lib/python3.10/site-packages/rq/worker.py", line 936, in perform_job
    rv = job.perform()
  File "/opt/venv/lib/python3.10/site-packages/rq/job.py", line 684, in perform
    self._result = self._execute()
  File "/opt/venv/lib/python3.10/site-packages/rq/job.py", line 690, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/django/cvat/apps/engine/backup.py", line 632, in _import_task
    db_task = task_importer.import_task()
  File "/home/django/cvat/apps/engine/backup.py", line 624, in import_task
    self._import_task()
  File "/home/django/cvat/apps/engine/backup.py", line 606, in _import_task
    _create_thread(self._db_task.pk, data.copy(), isBackupRestore=True)
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/home/django/cvat/apps/engine/task.py", line 430, in _create_thread
    manifest_file = _validate_manifest(
  File "/home/django/cvat/apps/engine/task.py", line 297, in _validate_manifest
    if is_manifest(full_manifest_path):
  File "/home/django/utils/dataset_manifest/core.py", line 733, in is_manifest
    return _is_video_manifest(full_manifest_path) or \
  File "/home/django/utils/dataset_manifest/core.py", line 738, in _is_video_manifest
    return validator.validate()
  File "/home/django/utils/dataset_manifest/core.py", line 651, in validate
    with open(self._manifest.path, 'r') as manifest:
FileNotFoundError: [Errno 2] No such file or directory: '/home/django/share/manifest.jsonl'

Possible Solution

Current workarround:

Replace "storage": "share" with "storage": "local" in the task.json

Context

Your Environment

davy-blavette commented 1 month ago

up....the same for project.

Create a Project from share Backup the Project Try to create a project from the backup on new instance

Could not restore project backup.
FileNotFoundError: [Errno 2] No such file or directory: '/home/django/share/manifest.jsonl'