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

CLI create task error with sorting_method #4962

Closed
vjpdss opened this issue Sep 16, 2022 · 2 comments · Fixed by #5058
Closed

CLI create task error with sorting_method #4962

vjpdss opened this issue Sep 16, 2022 · 2 comments · Fixed by #5058
Assignees
Labels
bug Something isn't working sdk/cli

Comments

@vjpdss
Copy link

vjpdss commented Sep 16, 2022

I am trying to upload tasks via command line interface using the following command:

(cvat) user@machine:~/cvat python cvat-cli/src/cvat_cli/__main__.py --auth some_user:some_password \
--server-host some_server create test_cli \
share //some_folder/some_file.mp4 --chunk_size 8 \
--completion_verification_period 5 --frame_step 360 \
--project_id 1 --lfs --overlap 0 --segment_size 100 \
--use_zip_chunks --use_cache

I have tried this with the script in the cvat repo and installing cvat-cli using pip:

(cvat) user@machine:~/cvat cvat-cli --auth some_user:some_password \
--server-host some_server create test_cli \
share //some_folder/some_file.mp4 --chunk_size 8 \
--completion_verification_period 5 --frame_step 360 \
--project_id 1 --lfs --overlap 0 --segment_size 100 \
--use_zip_chunks --use_cache

Get the same error using both cases.

Expected Behaviour

I would expect the task to be created successfully.

Current Behaviour

I get the following output using both methods:

0.00B [00:00, ?B/s][2022-09-16 11:08:49] INFO: Created task ID: 29 NAME: test_cli
[2022-09-16 11:08:49] CRITICAL: Status Code: 400
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Allow': 'GET, POST, HEAD, OPTIONS', 'Content-Length': '69', 'Content-Type': 'application/vnd.cvat+json', 'Date': 'Fri, 16 Sep 2022 09:08:49 GMT', 'Referrer-Policy': 'same-origin', 'Server': 'Apache', 'Vary': 'Accept,Origin', 'X-Content-Type-Options': 'nosniff', 'X-Frame-Options': 'DENY'})
HTTP response body: {"sorting_method":["\"\"lexicographical\"\" is not a valid choice."]}

Possible Solution

I have used tcpdump to capture traffic and used wireshark to see what's going on with the HTTP stream. Since the problem is in that it is not recognising the sorting method when using the CLI i have tried and captured traffic using the WUI and the CLI. The difference is merely that when using the CLI, the are extra quotation marks added to the string value of sorting_method:
CVAT_HTTP_WUI
CVAT_HTTP_CLI

I am not very familiar with HTTP protocols and how cvat server handles these requests, but I am assuming that removing the quotation marks from the sorting method would suffice.

Thanks in advance and please let me know if there's any extra information you need (this is my firts issue)

@zhiltsov-max zhiltsov-max self-assigned this Sep 16, 2022
@zhiltsov-max zhiltsov-max added bug Something isn't working sdk/cli labels Sep 16, 2022
@zhiltsov-max
Copy link
Contributor

Hi, thank you for reporting the problem. Yes, it looks like a bug. As a temporary workaround, please use the UI vesion.

@jenschurchill
Copy link

This breaks my automated pipeline; Please note that frame_filter "step=24" is also quoted in one and not the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sdk/cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants