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

Unable to run rest api tests - No such container:path: test_cvat_server_1:\tmp #5063

Closed
awbage opened this issue Oct 9, 2022 · 10 comments
Closed

Comments

@awbage
Copy link

awbage commented Oct 9, 2022

My actions before raising this issue

Expected Behaviour

Running tests

Current Behaviour

When I run a specific test or all tests using "pytest ./tests/python" I'm getting an error msg:
No such container:path: test_cvat_server_1:\tmp

Possible Solution

It seems to me, Docker doesn't execute copying function properly
tests/python/shared/fixtures/init.py :196 - docker_restore_data_volumes

Context

Environment was installed in accordance with the instructions
Here is a problem with copying tarball or creating "tmp" directory
I also tried to add required directory in test-cvat_server-1 container manually but it didn't work out

If you know what can I do about it please let me know. Thank you
tcs1
docker

Your Environment

  • Python 3.9
  • Docker-compose v2.10.2
  • Docker version 20.10.17
  • Windows 10 21H2
  • Other diagnostic information / logs:

! _pytest.outcomes.Exit: Command failed: docker container cp C:\Users\Я\PycharmProjects\cvat\tests\python\shared\assets\cvat_db\cvat_data.tar.bz2 test_cvat_server_1:/tmp/cvat_data.tar.
bz2.
Error message: Error: No such container:path: test_cvat_server_1:\tmp
no_such_cont

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Oct 10, 2022

Hi! Could you please say:

  1. If it was the first run of tests, or you did it previously?
  2. If you can start the containers, what is the docker exec -it test_cvat_server_1 ls -lah / command output?

Could you also try to follow the advice from this discussion?

@awbage
Copy link
Author

awbage commented Oct 10, 2022

Hi!

  1. The issue is the same since the very first attempt to run tests
  2. Output - Error: No such container: test_cvat_server_1
    lah
    But maybe it makes sense to use dash symbols instead (docker exec -it test-cvat_server-1 ls -lah)
    dash
  3. I also tried to follow the advice from provided link, but didn't help
    I'll see what else I can do, and will keep you updated!
    If there is anything else I should try, please let me know. I only have a couple of days left to complete the test, and I I would greatly appreciate any assistance.

@zhiltsov-max
Copy link
Contributor

Hmm, in the develop branch containers use underscores in their names. Which CVAT version are you using? Did you modify files somehow?

@awbage
Copy link
Author

awbage commented Oct 10, 2022

I had to modify two files since I couldn't install the cvat_sdk.api_client module but I thought it was not the cause of this problem
client

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Oct 10, 2022

No, this seems unrelated. Did you try to rename any containers?

The developer installation instructions for SDK and CLI are available here. You'll need to install both SDK and CLI like this: pip install -e cvat-sdk/, pip install -e cvat-cli/ to resolve the error on the screenshot.

@awbage
Copy link
Author

awbage commented Oct 10, 2022

No, I didn't try to rename them, should I?

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Oct 10, 2022

I'm not sure why in your case the containers have the test- prefix, while they are supposed to have underscores (_) in their names. If you can, please try to rename them (or just sync your branch with the actual develop).

@awbage
Copy link
Author

awbage commented Oct 10, 2022

Renaming some of these containers manually has finally led to some kind of success
Thank you!
test

@zhiltsov-max
Copy link
Contributor

I will close the issue as resolved. Feel free to reopen, if needed.

@azhavoro
Copy link
Contributor

https://stackoverflow.com/questions/69464001/docker-compose-container-name-use-dash-instead-of-underscore

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

3 participants