-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What happened?
ModuleNotFound error when starting docs container ( podman-compose -f docker-compose.docs.yml up
).
The module in question is my app. I wonder if sphinx expects the app to be inside the main app folder...
What should've happened instead?
podman-compose -f docker-compose.docs.yml up
should have created a server on localhost:9000 without errors.
Additional details
command run podman-compose -f docker-compose.docs.yml up
backtrace:
Traceback
[docs] | =========
[docs] |
[docs] | File "/usr/local/lib/python3.12/site-packages/sphinx/config.py", line 616, in eval_config_file
[docs] | raise ConfigError(msg % traceback.format_exc()) from exc
[docs] | sphinx.errors.ConfigError: There is a programmable error in your configuration file:
[docs] |
[docs] | Traceback (most recent call last):
[docs] | File "/usr/local/lib/python3.12/site-packages/sphinx/config.py", line 601, in eval_config_file
[docs] | exec(code, namespace) # NoQA: S102
[docs] | ^^^^^^^^^^^^^^^^^^^^^
[docs] | File "/docs/conf.py", line 27, in <module>
[docs] | django.setup()
[docs] | File "/usr/local/lib/python3.12/site-packages/django/__init__.py", line 24, in setup
[docs] | apps.populate(settings.INSTALLED_APPS)
[docs] | File "/usr/local/lib/python3.12/site-packages/django/apps/registry.py", line 91, in populate
[docs] | app_config = AppConfig.create(entry)
[docs] | ^^^^^^^^^^^^^^^^^^^^^^^
[docs] | File "/usr/local/lib/python3.12/site-packages/django/apps/config.py", line 193, in create
[docs] | import_module(entry)
[docs] | File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
[docs] | return _bootstrap._gcd_import(name[level:], package, level)
[docs] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[docs] | File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
[docs] | File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
[docs] | File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
[docs] | ModuleNotFoundError: No module named 'my_app_name'
[docs] |
[docs] |
[docs] | The full traceback has been saved in:
[docs] | /tmp/sphinx-err-vnexuvpd.log
[docs] |
[docs] | To report this error to the developers, please open an issue at <https://github.com/sphinx-doc/sphinx/issues/>. Thanks!
[docs] | Please also report this if it was a user error, so that a better error message can be provided next time.
[docs] | Sphinx exited with exit code: 2
[docs] | The server will continue serving the build folder, but the contents being served are no longer in sync with the documentation sources. Please fix the cause of the error above or press Ctrl+C to stop the server.
[docs] | [sphinx-autobuild] Serving on http://0.0.0.0:9000
[docs] | [sphinx-autobuild] Waiting to detect changes...
navigating to localhost:9000 shows a plain html file with the text 'not found'.
- Host system configuration:
- Version of cookiecutter CLI (get it with
cookiecutter --version
):
- Version of cookiecutter CLI (get it with
Cookiecutter 2.6.0 from /var/home/james/src/asset_mgmt/.venv/lib64/python3.13/site-packages (Python 3.13.6 (main, Aug 7 2025, 00:00:00) [GCC 15.2.1 20250808 (Red Hat 15.2.1-1)])
-
- OS name and version:
Fedora Silverblue release 42 (Adams)
-
Python version, run
python3 -V
:
Python 3.13.6
-
-
Docker version (if using Docker), run
docker --version
:I use podman on development machine and docker on production
-
podman version 5.5.2
- docker compose version (if using Docker), run
docker compose --version
:
podman-compose version 1.4.1
-
Options selected and/or replay file:
On Linux and macOS:cat ${HOME}/.cookiecutter_replay/cookiecutter-django.json
(Please, take care to remove sensitive information)nothing particularly relevant