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

cannot import project dataset #4515

Closed
2 tasks done
k1won opened this issue Mar 25, 2022 · 3 comments
Closed
2 tasks done

cannot import project dataset #4515

k1won opened this issue Mar 25, 2022 · 3 comments

Comments

@k1won
Copy link
Contributor

k1won commented Mar 25, 2022

My actions before raising this issue

Expected Behaviour

Current Behaviour

  • when I import the dataset after exporting it in the project, the following error occurs.

Could not import dataset to the project 66
Error: Request failed with status code 500. "rest_framework.exceptions.ValidationError: [ErrorDetail(string='The task and its project should be in the same organization.', code='invalid')]\n".

image

Possible Solution

  • fix the relate code
diff --git a/cvat/apps/dataset_manager/bindings.py b/cvat/apps/dataset_manager/bindings.py
index edfeec52..29f81194 100644
--- a/cvat/apps/dataset_manager/bindings.py
+++ b/cvat/apps/dataset_manager/bindings.py
@@ -1547,11 +1547,13 @@ def load_dataset_data(project_annotation, dataset: Dataset, project_data):
         job.meta['progress'] = (subset_id + job.meta.get('task_progress', 0.)) / len(dataset.subsets().keys())
         job.save_meta()
 
+        task = project_annotation.db_tasks[subset_id]
         task_fields = {
             'project': project_annotation.db_project,
-            'name': subset.name,
+            'name': task.name,
             'owner': project_annotation.db_project.owner,
             'subset': subset.name,
+            'organization': task.organization
         }
 
         subset_dataset = subset.as_dataset()

Steps to Reproduce (for bugs)

  1. create a task in a project
  2. click "Export data" menu on the project (format : CVAT for images 1.1)
  3. import data using the exported file above (format : CVAT 1.1)

Context

Your Environment

  • Git hash commit (git log -1): 2a05316
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS): ubuntu 18.04
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

@vkolla1
Copy link

vkolla1 commented Feb 1, 2023

I am still facing this issue when i create the task through CLI and SDK. Is the issue fixed?

@nmanovic
Copy link
Contributor

nmanovic commented Feb 1, 2023

@vkolla1 , probably you need to describe your issue one more time and provide steps to reproduce. If you can do that on CVAT.ai, it will help us a lot.

@Stanley-Michael
Copy link

Stanley-Michael commented Mar 14, 2023

Steps to reproduce:
with CVAT-server running on the remote machine:

  1. create a new organisation
  2. create a new project in that organisation through the UI
  3. Using CVAT CLI try and add tasks to that project with
    """
    command = f'cvat-cli --auth {username}:{password} --server-host {IP} --server-port {port} create "task from dataset_{group_num}" --project_id 2 --image_quality 75 --annotation_path {annotation_path} local {train_groups_dir}/{train_group}/*'
    """

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants