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

Restoring task's backup which initially was created from file share fails #8297

Open
2 tasks done
klakhov opened this issue Aug 13, 2024 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@klakhov
Copy link
Contributor

klakhov commented Aug 13, 2024

Actions before raising this issue

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

Steps to Reproduce

During development of #8287 the problem occured:

  1. Connect file share to CVAT
  2. Create a task with files from share
  3. Add some annotations
  4. Backup the task
  5. Try to restore it, the error occurs:
    image

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:
image

Backup with task from local files looks like:
image

Context

No response

Environment

  • Git commit ff50b46
  • 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'
@klakhov klakhov added the bug Something isn't working label Aug 13, 2024
@MSDEV0630
Copy link

Hello, Has this issue been resolved? I would like to resolve this issue if it has not been as I am currently working on a open source project with bugs that need fixing and I would like to take this task on. Please let me know.

@klakhov
Copy link
Contributor Author

klakhov commented Nov 7, 2024

@MSDEV0630,
No, it was not resolved. You can try to reproduce it using the provided scenario.

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
None yet
Development

No branches or pull requests

2 participants