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
Issue:
The documentation is successfully building on readthedocs, but, the sections where the .. automdule:: is being used is causing problems. Have a look at it at one of the latest build logs I checked recently here. I take an example of the file bolt.lib.linear_solver.linear_solver.rst in the documentation to explain the issue. Inside that file,
is written. So, here, autodoc is trying to import bolt.lib.linear_solver.linear_solver file. But, it is not able to import bolt, resulting in failure of autodoc to document the module.
Possible Reason:
This might be happening because the bolt directory is not in the same directory as the directory from where sphinx is being run. So, by default sphinx is assuming that the bolt directory is in the docs directory (because that's where you are running make). You need to tell conf.py the exact location of the bolt directory.
Possible Implementation: Add this line at the beginning of conf.py
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
Since I have actually not run it, you may have to check whether it's going to be ../ directory or ../../ directory.
Note: I found out that even if you resolve this problem you will face another problem after autodoc successfully imports bolt. When autodoc tries to import bolt.lib.linear_solver.linear_solver, it will encounter import arrayfire in that file and arrayfire is not installed in readthedocs. So, autodoc will fail again. I am also facing a similar problem, but, I am still searching for a solution.
The text was updated successfully, but these errors were encountered:
Commit: e423e7e
Issue:
The documentation is successfully building on
readthedocs
, but, the sections where the.. automdule::
is being used is causing problems. Have a look at it at one of the latest build logs I checked recently here. I take an example of the filebolt.lib.linear_solver.linear_solver.rst
in the documentation to explain the issue. Inside that file,is written. So, here,
autodoc
is trying to importbolt.lib.linear_solver.linear_solver
file. But, it is not able to importbolt
, resulting in failure ofautodoc
to document the module.Possible Reason:
This might be happening because the
bolt
directory is not in the same directory as the directory from wheresphinx
is being run. So, by defaultsphinx
is assuming that the bolt directory is in thedocs
directory (because that's where you are runningmake
). You need to tellconf.py
the exact location of thebolt
directory.Possible Implementation: Add this line at the beginning of
conf.py
Since I have actually not run it, you may have to check whether it's going to be
../
directory or../../
directory.Note: I found out that even if you resolve this problem you will face another problem after
autodoc
successfully imports bolt. Whenautodoc
tries to importbolt.lib.linear_solver.linear_solver
, it will encounterimport arrayfire
in that file and arrayfire is not installed inreadthedocs
. So,autodoc
will fail again. I am also facing a similar problem, but, I am still searching for a solution.The text was updated successfully, but these errors were encountered: