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

Python SDK client.tasks.create_from_data does not work #5584

Closed
PMazarovich opened this issue Jan 12, 2023 · 7 comments
Closed

Python SDK client.tasks.create_from_data does not work #5584

PMazarovich opened this issue Jan 12, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@PMazarovich
Copy link
Contributor

Current Behaviour

Try upload the remote file into cvat with this code:

with Client('localhost:8080') as client:
    client.login(('test', 'test'))
    task_spec = {
        "name": "testNAME",
        "project_id": 1,
        "assignee_id": 1,
    }
    client.tasks.create_from_data(spec=task_spec, resource_type=ResourceType.REMOTE, resources=["http://192.168.48.12:85/blabalbla.mp4"])

You will get url in additional quotes, that leads to an error in cvat server def _validate_url(url) failure as url looks like '"http://192.168.48.12:85/blabalbla.mp4"'.

Your Environment

CVAT 2.2.0

@bsekachev
Copy link
Member

bsekachev commented Jan 19, 2023

Hi, @PMazarovich

I am not sure that 192.168.48.12:85 is reachable from a docker container. Did you check it?

@PMazarovich
Copy link
Contributor Author

Hello, @bsekachev , I am sure, this address is reachable. I can upload video from this address using "remote sources" from UI

@bsekachev
Copy link
Member

Okay, let's mark it as a bug, need to investigate.

@zhiltsov-max Do you have some ideas why it does not work with SDK? Can it be related with that Client was initialized by 'localhost:8080'?

@bsekachev bsekachev added the bug Something isn't working label Jan 23, 2023
@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Jan 23, 2023

@PMazarovich, could you please specify the SDK version? There was a fixed issue, which may be related - #4962.

@PMazarovich
Copy link
Contributor Author

@zhiltsov-max , 2.1.0.post1

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Jan 23, 2023

Could you please try to upgrade to the latest version with pip install --upgrade cvat-cli, if possible? Note that the latest release is for 2.3.0 and there was no dedicated release for 2.2.0, so there might be some issues when using it with 2.2.0. In that case, you will need to generate the SDK from the 2.2.0 release branch, the instructions are here.

@PMazarovich
Copy link
Contributor Author

@zhiltsov-max , @bsekachev after updating cli and sdk all worked
Thanks!

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

3 participants