1

When I type make html, I got error about auto-summary failed to import the python module.

    sphinx-build -b html -d build/doctrees   source build/html
Running Sphinx v3.2.1
making output directory... done
[autosummary] generating autosummary for: capi/index.rst, devguide/contributing.rst, devguide/docbuild.rst, devguide/docker.rst, devguide/index.rst, devguide/styleguide.rst, devguide/tests.rst, devguide/user-input.rst, devguide/workflow.rst, examples/cad-geom.rst, ..., usersguide/install.rst, usersguide/materials.rst, usersguide/parallel.rst, usersguide/plots.rst, usersguide/processing.rst, usersguide/scripts.rst, usersguide/settings.rst, usersguide/tallies.rst, usersguide/troubleshoot.rst, usersguide/volume.rst
Failed to import 'openmc.lib': no module named openmc.lib
WARNING: [autosummary] failed to import 'openmc.cmfd.CMFDMesh': no module named openmc.cmfd.CMFDMesh
WARNING: [autosummary] failed to import 'openmc.cmfd.CMFDRun': no module named openmc.cmfd.CMFDRun
WARNING: [autosummary] failed to import 'openmc.deplete.AtomNumber': no module named openmc.deplete.AtomNumber
WARNING: [autosummary] failed to import 'openmc.deplete.CECMIntegrator': no module named openmc.deplete.CECMIntegrator
WARNING: [autosummary] failed to import 'openmc.deplete.CELIIntegrator': no module named openmc.deplete.CELIIntegrator
WARNING: [autosummary] failed to import 'openmc.deplete.CF4Integrator': no module named openmc.deplete.CF4Integrator
WARNING: [autosummary] failed to import 'openmc.deplete.Chain': no module named openmc.deplete.Chain
WARNING: [autosummary] failed to import 'openmc.deplete.DecayTuple': no module named openmc.deplete.DecayTuple
WARNING: [autosummary] failed to import 'openmc.deplete.EPCRK4Integrator': no module named openmc.deplete.EPCRK4Integrator
WARNING: [autosummary] failed to import 'openmc.deplete.FissionYield': no module named openmc.deplete.FissionYield
WARNING: [autosummary] failed to import 'openmc.deplete.FissionYieldDistribution': no module named openmc.deplete.FissionYieldDistribution
WARNING: [autosummary] failed to import 'openmc.deplete.LEQIIntegrator': no module named openmc.deplete.LEQIIntegrator
WARNING: [autosummary] failed to import 'openmc.deplete.Nuclide': no module named openmc.deplete.Nuclide
[autosummary] generating autosummary for: /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.AzimuthalFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.Cell.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellFromFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellInstanceFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.CellbornFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.Complement.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.Cone.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.DelayedGroupFilter.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.DistribcellFilter.rst, ..., /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Normal.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Point.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.PolarAzimuthal.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Spatial.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.SphericalIndependent.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Tabular.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Uniform.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.UnitSphere.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Univariate.rst, /home/pranto/Desktop/2nd PR/docs/openmc-0.12.0/docs/source/pythonapi/generated/openmc.stats.Watt.rst
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/scipy/reference/objects.inv...
loading intersphinx inventory from https://pandas.pydata.org/pandas-docs/stable/objects.inv...
loading intersphinx inventory from https://matplotlib.org/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 116 source files that are out of date
updating environment: [new config] 357 added, 0 changed, 0 removed
reading sources... [  2%] examples/cad-geom                                                                                                       
Exception occurred:
  File "/home/pranto/anaconda3/envs/test/lib/python3.8/site-packages/jinja2/loaders.py", line 429, in load
    raise TemplateNotFound(name)
jinja2.exceptions.TemplateNotFound: full
The full traceback has been saved in /tmp/sphinx-err-spegijiz.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:50: recipe for target 'html' failed
make: *** [html] Error 2

I do have installed openmc in my conda environment.

In [2]: openmc.__version__
Out[2]: '0.12.1-dev'

and

# packages in environment at /home/pranto/anaconda3/envs/test:
#
# Name                    Version                   Build  Channel
openmc                    0.12.1.dev0              pypi_0    pypi

I have all dependency installed.

# packages in environment at /home/pranto/anaconda3/envs/test:
#
# Name                    Version                   Build  Channel
sphinx                    3.2.1                    pypi_0    pypi
sphinx-numfig             0.1.1                    pypi_0    pypi
sphinx-rtd-theme          0.5.0                    pypi_0    pypi
sphinxcontrib-applehelp   1.0.2                    pypi_0    pypi
sphinxcontrib-devhelp     1.0.2                    pypi_0    pypi
sphinxcontrib-htmlhelp    1.0.3                    pypi_0    pypi
sphinxcontrib-jsmath      1.0.1                    pypi_0    pypi
sphinxcontrib-katex       0.6.1                    pypi_0    pypi
sphinxcontrib-qthelp      1.0.3                    pypi_0    pypi
sphinxcontrib-serializinghtml 1.1.4                    pypi_0    pypi
sphinxcontrib-svg2pdfconverter 1.1.0                    pypi_0    pypi

Take a look at the link. docs Why doesn't he find the python module when I have already installed it? What's the solution? Can anyone offer some suggestions?

Pranto
  • 29
  • 5
  • Is Sphinx installed in the same virtual environment as openmc? – Steve Piercy Sep 19 '20 at 20:21
  • Yep, @StevePiercy. I have all dependency installed. Do you think this error is related to the sphinx? – Pranto Sep 20 '20 at 03:30
  • There is also a problem with Jinja: `jinja2.exceptions.TemplateNotFound: full` – mzjn Sep 20 '20 at 08:41
  • I do not see `openmc` in `/home/pranto/anaconda3/envs/test`. Import issues are almost never the fault of Sphinx, but almost always the fault of the user not installing the packages to be documented in the same virtual environment as Sphinx or not supplying the proper path in their `conf.py` such that Sphinx can import said packages. See the first note at https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc – Steve Piercy Sep 20 '20 at 10:05
  • @StevePiercy, I do have installed `openmc` in `/home/pranto/anaconda3/envs/test`. The proper path has also given in `conf.py` by `sys.path.insert(0, os.path.abspath('../..'))`. – Pranto Sep 20 '20 at 12:57
  • How should I solve `jinja2.exceptions.TemplateNotFound: full` error? – Pranto Oct 07 '20 at 07:33
  • @Pranto there's a chance this is an anaconda problem. Not everyone uses anaconda, it's possible you've installed the needed packages in a normal `venv` that isn't inside anaconda. You should also [activate your venv](https://stackoverflow.com/questions/62498127) I'm not experienced with anaconda so you should research how to use it specifically. One way to isolate the problem is replicating the project without anaconda and verifying if it has the same problems. – bad_coder Oct 11 '20 at 00:42

0 Answers0