-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
creating task with image via rest api #493
Comments
Hi @roik7 , answered in gitter. You need to add indexes. If you want to send only one file. Don't hesitate to contribute your script. We will be happy to have a simple script or an example. Thus other people can use the same functionality easily. "client_files" --> "client_files[0]" |
@nmanovic - thanks for the help! for whoever using the requests lib the updated functions are:
|
for anyone arriving here, to explain further the code - TASK_DATA_PATH is data
|
hi i am also trying to add a image to task created by Rest end points but get an Value-Error saying :=#raise ValueError('No media data found') |
Hi, I had a similar task where i needed to create tasks in a pre-defined project in CVAT using CVAT REST API. I am also uploading images to these tasks. There are some other methods too for debug. Happy for my contribution. |
Hello,
I'm new to cvat but from what I saw so far it's a great project, thank you!
I'm trying to create multiple tasks using the rest api.
Task is being created but when updating its data (http://localhost:8080/api/v1/tasks/<task_id>/data) I get a failure.
Looking at the task log inside the docker image I see the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 812, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 588, in perform
self._result = self._execute()
File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 594, in _execute
return self.func(*self.args, **self.kwargs)
File "/usr/lib/python3.5/contextlib.py", line 30, in inner
return func(*args, **kwds)
File "/home/django/cvat/apps/engine/task.py", line 372, in _create_thread
_copy_images_to_task(upload_dir, db_task)
File "/home/django/cvat/apps/engine/task.py", line 244, in _copy_images_to_task
raise ValueError("Image files were not found")
ValueError: Image files were not found
This was when I started to suspect there's a problem with the way I upload the images 😄
But not sure what it is the correct format in which they should be sent.
Attaching the code for the upload (I give a directory path in which all the images I want to upload are in, at the moment it's one image that I'm able to upload using the UI).
Any help will be much appreciated.
The text was updated successfully, but these errors were encountered: