cvat
cvat copied to clipboard
Restoring task's backup which initially was created from file share fails
Actions before raising this issue
- [X] I searched the existing issues and did not find anything similar.
- [X] I read/searched the docs
Steps to Reproduce
During development of #8287 the problem occured:
- Connect file share to CVAT
- Create a task with files from share
- Add some annotations
- Backup the task
- Try to restore it, the error occurs:
Expected Behavior
Backup should be restored successfully
Possible Solution
It seems backup of the task which is created from local files and file share have different folder structure. Maybe this is the problem.
Backup with task from share
looks like this:
Backup with task from local
files looks like:
Context
No response
Environment
- Git commit ff50b464ddaa85a2496da79ac87fa71455f01c92
- Env: local
- Full error log:
[2024-08-13 08:10:57,951] ERROR rq.worker: [Job import:task-02f399a3-612d-4bd8-b1fb-9ed57c83c2e9-backup]: exception raised while executing (cvat.apps.engine.utils.import_resource_with_clean_up_after)
Traceback (most recent call last):
File "/home/kirill/projects/cvat/.env/lib/python3.10/site-packages/rq/worker.py", line 1431, in perform_job
rv = job.perform()
File "/home/kirill/projects/cvat/.env/lib/python3.10/site-packages/rq/job.py", line 1280, in perform
self._result = self._execute()
File "/home/kirill/projects/cvat/.env/lib/python3.10/site-packages/rq/job.py", line 1317, in _execute
result = self.func(*self.args, **self.kwargs)
File "/home/kirill/projects/cvat/cvat/apps/engine/utils.py", line 289, in import_resource_with_clean_up_after
result = func(filename, *args, **kwargs)
File "/usr/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/kirill/projects/cvat/cvat/apps/engine/backup.py", line 751, in _import_task
db_task = task_importer.import_task()
File "/home/kirill/projects/cvat/cvat/apps/engine/backup.py", line 742, in import_task
self._import_task()
File "/home/kirill/projects/cvat/cvat/apps/engine/backup.py", line 690, 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/kirill/projects/cvat/cvat/apps/engine/task.py", line 553, in _create_thread
manifest_file = _validate_manifest(
File "/home/kirill/projects/cvat/cvat/apps/engine/task.py", line 342, in _validate_manifest
if is_manifest(full_manifest_path):
File "/home/kirill/projects/cvat/utils/dataset_manifest/core.py", line 819, in is_manifest
return is_video_manifest(full_manifest_path) or \
File "/home/kirill/projects/cvat/utils/dataset_manifest/core.py", line 824, in is_video_manifest
return validator.validate()
File "/home/kirill/projects/cvat/utils/dataset_manifest/core.py", line 737, in validate
with open(self._manifest.path, 'r') as manifest:
FileNotFoundError: [Errno 2] No such file or directory: '/home/kirill/projects/cvat/share/manifest.jsonl'