-
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
cvat_sdk task.export_dataset
fails if dataset export has been called once recently.
#8256
Comments
task.export_dataset
fails if dataset export has been called once.task.export_dataset
fails if dataset export has been called once recently.
Here is my workaround if it helps anyone else:
|
With using CVAT Version = 2.16.2, code:
Error |
…sets`|`backups` (#8255) - Fixed exporting the same dataset or backup twice in a row using high-level SDK (switched to new export API version) (related #8256) - Fixed exporting a dataset or backup using high-level SDK when the default project or task location refers to cloud storage - Added ability to explicitly specify location when exporting datasets and backups using high-level SDK ## Summary by CodeRabbit - **New Features** - Introduced mixins for exporting datasets and downloading backups, enhancing functionality across multiple classes. - Added a new fixture for testing tasks with specified target storage, improving test coverage. - **Bug Fixes** - Improved error handling in the file download process to ensure validity before proceeding. - **Refactor** - Restructured the downloading mechanism for better modularity and maintainability. - Removed outdated methods in favor of mixin functionality, streamlining class design. - **Tests** - Enhanced the test suite with additional scenarios and flexibility for task management and dataset downloading. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com>
Fixed by #8255 |
…sets`|`backups` (cvat-ai#8255) - Fixed exporting the same dataset or backup twice in a row using high-level SDK (switched to new export API version) (related cvat-ai#8256) - Fixed exporting a dataset or backup using high-level SDK when the default project or task location refers to cloud storage - Added ability to explicitly specify location when exporting datasets and backups using high-level SDK ## Summary by CodeRabbit - **New Features** - Introduced mixins for exporting datasets and downloading backups, enhancing functionality across multiple classes. - Added a new fixture for testing tasks with specified target storage, improving test coverage. - **Bug Fixes** - Improved error handling in the file download process to ensure validity before proceeding. - **Refactor** - Restructured the downloading mechanism for better modularity and maintainability. - Removed outdated methods in favor of mixin functionality, streamlining class design. - **Tests** - Enhanced the test suite with additional scenarios and flexibility for task management and dataset downloading. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Maxim Zhiltsov <zhiltsov.max35@gmail.com>
Actions before raising this issue
Steps to Reproduce
Assumes
from cvat_sdk import make_client
being used and high level SDKtask.export_dataset("CVAT for images 1.1", dest_path_zip, include_images=False)
task.export_dataset("CVAT for images 1.1", dest_path_zip, include_images=False)
The second call will throw an exception because it receives a
201
status since the request is already created / request is ready for download, but code assumes only good response is202
(it received the request and will start prepping download).cvat/cvat-sdk/cvat_sdk/core/downloading.py
Line 100 in f3dcc3e
Expected Behavior
The second call succesfully downloads dataset to
dest_path_zip
should work.Possible Solution
If the downloading helper receives a
201
it should find the corresponding request and download the zip.I'm not certain joining the request to the right id will be trivial or not. Could the 201 also return the request id?
Context
I intend to work around by writing my own code using the low level API to query requests for completed one if I get a 201 exception.
Environment
The text was updated successfully, but these errors were encountered: