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

ImportError: cannot import name 'ImageNotFound' from 'docker.errors' #636

Open
ashishpatel26 opened this issue Feb 1, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ashishpatel26
Copy link

ashishpatel26 commented Feb 1, 2025

Description:

I encountered an issue while running tests using pytest in my project. The error message is as follows:

ImportError: cannot import name 'ImageNotFound' from 'docker.errors' (C:\Users\ibm26\AppData\Roaming\Python\Python310\site-packages\docker\errors.py)

Steps to Reproduce:

  1. Clone the repository.
  2. Set up the environment (e.g., llms Conda environment).
  3. Install the dependencies.
  4. Run the tests using the command: pytest -s
  5. The error occurs when trying to import ImageNotFound from docker.errors.

Expected Behavior:

The import should work without errors, and the tests should execute successfully.

Actual Behavior:

The import fails, and the following error is raised:

ImportError: cannot import name 'ImageNotFound' from 'docker.errors' (C:\Users\ibm26\AppData\Roaming\Python\Python310\site-packages\docker\errors.py)

Environment:

  • Python version: 3.10.11
  • Operating system: Windows 10
  • Docker version: [provide your version here, if applicable]
  • Dependencies: [list the dependencies relevant to the project]

Additional Information:

  • The issue may be caused by a conflict between docker and docker-py packages.
  • I have attempted uninstalling and reinstalling docker, but the issue persists.

Suggested Solution:

  • Ensure that the correct version of the docker package is installed and there is no conflict with docker-py.
  • Verify that ImageNotFound can be imported correctly after resolving any potential package conflicts.
@ashishpatel26 ashishpatel26 added the bug Something isn't working label Feb 1, 2025
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

1 participant