-
Notifications
You must be signed in to change notification settings - Fork 150
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
failed to import utils #4
Comments
I also would have expected that sub folders are imported automatically without having the need to explicitly add them. |
If changing in main.py the following line to from crawler.utils import log, should_ignore the autodoc in sphinx is working, but if calling the script with python3 itself i get the following error message:
But if leaving in main.py the following line as from utils import log, should_ignore autodoc fails again but but calling the script in python3 itself is working again. In both cases they seem to have a different sys.path: (venv) pink@debian-t470:~/Dokumente/pycon-sphinx-tutorial/crawler/docs$ make html
OR (venv) pink@debian-t470:~/Dokumente/pycon-sphinx-tutorial/crawler/src/crawler$ python3 main.py
|
I had the same issue and ended up having both these lines in my
|
Does anyone have a solution for this except adding |
without adding
sys.path.insert(0, os.path.abspath('../src/crawler/'))
to conf.py I get following error message:
WARNING: autodoc: failed to import module 'main' from module 'crawler'; the following exception was raised:
No module named 'utils'
Think this should be added in the Tutorial because it took me one hour to find out while doing Step 2
The text was updated successfully, but these errors were encountered: