question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with pyright : error: "DockerClient" is not exported from module "python_on_whales"

See original GitHub issue

Hello,

I have this error with pyright:

"error: "DockerClient" is not exported from module "python_on_whales"
    Import from "python_on_whales.docker_client" instead (reportPrivateImportUsage)"

i am using the latest version of pyright and python-on-whales.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
gabrieldemarmiessecommented, Jul 25, 2022

I will add the __all__ as it’s very low effort and recommended by pep8. But there is no garantee that it’s going to fix the pyright issue. In any case, it seems that pyright doesn’t handle this case well and the ball is on their side. As long as the import work, there shouldn’t be any warning

0reactions
gabrieldemarmiessecommented, Jul 30, 2022

The response was very interesting. It highlight that we could improve the codebase to clarify what is public and what is not

I’ll see what can be done in this area

Read more comments on GitHub >

github_iconTop Results From Across the Web

"DockerClient" is not exported from module "python_on_whales"
I have an error with pyright and with the usage of the library python_on_whales : error: "DockerClient" is not exported from module "python_on_whales" ......
Read more >
Docker client - Python on whales - GitHub Pages
Log in to a Docker registry. If no server is specified, the default is defined by the daemon. Arguments. server Optional[str] : The...
Read more >
python - Got ModuleNotFoundError error while running app ...
The error starts with /home/desktop/.local/bin/docker-compose which means it comes from docker-compose on the host machine, not from inside ...
Read more >
Guest Post: Calling the Docker CLI from Python with Python ...
In this post, we'll take a look at some of the features that are not available in docker-py but are available in Python-on-whales:...
Read more >
emacs-lsp/lsp-mode - Gitter
I'm trying to give lsp-pyright a shot but lsp-mode is always defaulting to ... I get this error, not sure how to interpret...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found