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
Circular import with sphinxcontrib.serializinghtml #6556
Comments
I tried to reproduce the error with following Dockefile. But it does not raise ImportError...
note: I need to install sphinxcontrib-images itself before building doc. |
If my understanding is correct, this will not cause circular imports. |
Indeed. This issue seems to be very sensitive to the environment, and many small variations make it work. I managed to write a dockerfile that reproduces it (with a lot of help from @douardda) , but only within a venv created by Tox:
One of the variations that make it work is to downgrade setuptools, which you can do by adding this before the last line:
There is also some unexplained way for tox to work outside docker without this manual downgrade, but I'm no longer able to reproduce it. |
Thank you for information. I also reproduced. It seems your build process installs
In this case, python interpreter considers Note: I also found another condition to reproduce this problem:
This will be resolved with upgrading setuptools to 41.0 or later. As an another way, moving to other directories also resolve the error:
I don't know what happened in setuptools, but this might be shown for developers. |
This issue is present in nixpkgs. Here is the build log https://hydra.nixos.org/build/109159566/nixlog/1. Relevant part
|
sphinx-doc/sphinx#6556 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
sphinx-doc/sphinx#6556 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Describe the bug
I can't run Sphinx because a circular import:
To Reproduce
Steps to reproduce the behavior:
-> ImportError on some computers
Expected behavior
no ImportError
Your project
https://github.com/t-b/sphinxcontrib-images/ branch port-to-sphinx-2.x
(that's not my projet, I'm just trying to make it work)
Environment info
Additional context
For some reason, the build does work on some computers. But when reading the source code, I don't understand why it does work on these.
(issue copied from #6245 (comment) )
The text was updated successfully, but these errors were encountered: