Readthedocs.org: Read The Docs automodule not working when I'm building it with rtd. but works when I build it with **make html** command

Created on 8 Jun 2018  路  2Comments  路  Source: readthedocs/readthedocs.org

Details

Hi,
I'm having trouble documenting a class with the autoclass command. I specified where are my source files and I don't get import errors that tell me Sphinx is not finding my module. I think I'm getting this part right because when I go in the docs folder and I enter the command:
$ make html
the html files build well and I get what I want, which is this class documented.

make html

When I build it with Read The Docs to have it hosted on https://picamera-gui.readthedocs.io/en/latest/code.html#picameragui-py, I don't get any error, but the class is not displayed.

build rtd

In the admin settings of my Read The Docs project, I specified a requirements.txt file that I built with
$ pip freeze > requirements.txt
admin settings

I also didn't check the Install your project inside a virtualenv using setup.py install box because I don't have a setup.py file in my folder and I don't know how I can install a virtual environment. When I check the box, I get this error in my Read The Docs builds

setup py

I think I'm missing something and if somebody knows rapidly what I'm doing wrong, it would be great.

If I forgot information that might help you finding my problem, here is my deposit:
https://github.com/jtpaquet/PiCamera-GUI

Thank you,
J茅r茅my Talbot-P芒quet

PS: Sorry for the documentation in French

Support

Most helpful comment

Thanks a lot! I didn't think there was any problems, because it was building. I already had my packages imported this way, but i forgot to add 'picamera'. Here in my conf.py.

solved

It was probably building with make html because Python was able to locate the 'picamera' package, but Read The Docs didn't beacause I didn't specify it.

If anybody has their project building with the make html command, but not with Read The Docs, click on view raw in your Read The Docs build to ensure there is not something missing.

All 2 comments

You have a warning in your build https://readthedocs.org/api/v2/build/7316389.txt line 558

WARNING: autodoc: failed to import class u'PiCameraGUI' from module u'PiCameraGUI'; the following exception was raised:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/picamera-gui/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc/importer.py", line 140, in import_module
    __import__(modname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/picamera-gui/checkouts/latest/picamera-gui/PiCameraGUI.py", line 12, in <module>
    from picamera import PiCamera
  File "/home/docs/checkouts/readthedocs.org/user_builds/picamera-gui/envs/latest/local/lib/python2.7/site-packages/picamera/__init__.py", line 72, in <module>
    from picamera.exc import (
  File "/home/docs/checkouts/readthedocs.org/user_builds/picamera-gui/envs/latest/local/lib/python2.7/site-packages/picamera/exc.py", line 41, in <module>
    import picamera.mmal as mmal
  File "/home/docs/checkouts/readthedocs.org/user_builds/picamera-gui/envs/latest/local/lib/python2.7/site-packages/picamera/mmal.py", line 47, in <module>
    from .bcm_host import VCOS_UNSIGNED
  File "/home/docs/checkouts/readthedocs.org/user_builds/picamera-gui/envs/latest/local/lib/python2.7/site-packages/picamera/bcm_host.py", line 47, in <module>
    _lib = ct.CDLL('libbcm_host.so')
  File "/usr/lib/python2.7/ctypes/__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libbcm_host.so: cannot open shared object file: No such file or directory

I think you need this https://docs.readthedocs.io/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules

Thanks a lot! I didn't think there was any problems, because it was building. I already had my packages imported this way, but i forgot to add 'picamera'. Here in my conf.py.

solved

It was probably building with make html because Python was able to locate the 'picamera' package, but Read The Docs didn't beacause I didn't specify it.

If anybody has their project building with the make html command, but not with Read The Docs, click on view raw in your Read The Docs build to ensure there is not something missing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

enielse picture enielse  路  4Comments

adamjstewart picture adamjstewart  路  4Comments

goerz picture goerz  路  4Comments

jaraco picture jaraco  路  4Comments

dxgldotorg picture dxgldotorg  路  3Comments