You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I moved the dependencies of my python project from a setup.cfg into a setup.py (to allow Dependabot pick them up) and since then RTD is unable to correctly generate the docs.
Locally, the docs build fine. If I build the same project on RTD, however, (after migrating the dependencies) then sphinx.autosummary can't import any modules. Similarly, if I add the line import ropy (name of the project) into sphinx's conf.py the entire build crashes because RTD can't import ropy (log attached).
I am using a .readthedocs.yaml which should install the project together with doc-related dependencies. Indeed, the logs show pip building the wheel and then claiming that it was installed. However, this does not seem to be the case. I tried to add the module to the path manually inside the conf.py, which allows to import ropy, but then breaks later when sub-modules are imported, because they depend on specific versions of external libraries which don't seem to be present. In particular, I need numpy in a sufficiently recent version to support from numpy.typing import ArrayLike, but this then crashes (build: https://readthedocs.org/projects/robotics-python/builds/14282476/) with an exception that suggests that the required numpy version isn't present.
Any pointers on where I should look to debug this are highly appreciated :)
.readthedocs.yaml
# .readthedocs.yaml# Read the Docs configuration file# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details# Requiredversion: 2# Build documentation in the docs/ directory with Sphinxsphinx:
configuration: doc/source/conf.py# Optionally build your docs in additional formats such as PDFformats:
- pdf# Optionally set the version of Python and requirements required to build your docspython:
install:
- method: pippath: .extra_requirements:
- docs
Read the Docs username (if applicable): FirefoxMetzger
Expected Result
The rendered docs match the local build and sphinx.automodule can import the module.
Actual Result
sphinx.automodule (and sphinx in general) can not import the module; however, the logs suggest that it has been installed.
The text was updated successfully, but these errors were encountered:
FirefoxMetzger
changed the title
RTD builds python module, but can't import it afterwards
RTD installs python module, but can't import it afterwards
Jul 20, 2021
However, it turns out that Sphinx autosummary can give bogus import errors, as I have recently learned from sphinx-doc/sphinx#7989. Therefore, let me confirm to you what is the source of the problem here.
Yes, RTD was installing ropy. However, the ropy package contained no files, that's why import ropy failed. I fixed that for you in FirefoxMetzger/scikit-bot#22. Notice that it departs from FirefoxMetzger/scikit-bot@6623b1e rather than your current main branch, be mindful if you end up merging it.
I'm closing this issue, feel free to open a new one if you still have problems.
I moved the dependencies of my python project from a
setup.cfg
into asetup.py
(to allow Dependabot pick them up) and since then RTD is unable to correctly generate the docs.Locally, the docs build fine. If I build the same project on RTD, however, (after migrating the dependencies) then sphinx.autosummary can't import any modules. Similarly, if I add the line
import ropy
(name of the project) into sphinx'sconf.py
the entire build crashes because RTD can'timport ropy
(log attached).I am using a
.readthedocs.yaml
which should install the project together with doc-related dependencies. Indeed, the logs show pip building the wheel and then claiming that it was installed. However, this does not seem to be the case. I tried to add the module to the path manually inside theconf.py
, which allows toimport ropy
, but then breaks later when sub-modules are imported, because they depend on specific versions of external libraries which don't seem to be present. In particular, I neednumpy
in a sufficiently recent version to supportfrom numpy.typing import ArrayLike
, but this then crashes (build: https://readthedocs.org/projects/robotics-python/builds/14282476/) with an exception that suggests that the required numpy version isn't present.Any pointers on where I should look to debug this are highly appreciated :)
.readthedocs.yaml
Details
Expected Result
The rendered docs match the local build and sphinx.automodule can import the module.
Actual Result
sphinx.automodule (and sphinx in general) can not import the module; however, the logs suggest that it has been installed.
The text was updated successfully, but these errors were encountered: