Hello,

I would like to create documentation of my code in Sphinx. I installed 
everything and made some simple trial that worked fine. (I run 
sphinx-quickstart, edit the conf.py to include modules' path, work with a 
tutorial to know how sphinx works etc. etc.)

Yet, my code import many kivy libraries. And when I want to create the 
documentation on module that import kivy, it fails.

For instance, if I have my main.py like this:

#!/usr/bin/python
# -*- coding: utf-8 -*-

from kivy.app import App

def test_app(a,b):
    """ Test documentation """
    print a + b

if __name__ == '__main__':
    test_app(1,2)



Then, if I run
>> make clean && make html

I have the following wanring (and no doc edited..):

WARNING: /home/math/drphytoscan/source/autodoc.rst:4: (WARNING/2) autodoc: 
failed to import module u'src.main'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 
657, in import_object
    __import__(self.modname)
  File "/home/math/drphytoscan/source/src/main.py", line 14, in <module>
    from kivy.app import App
ImportError: No module named app

Note: If I erase the line:

from kivy.app import App



it works. That shows that it comes from the kivy lib import.


Do you know what is the problem? Could you help me?

Thank you in advance!

M.

PS: I have python 2.7.9, kivy 1.9.1 and Sphinx 1.6.3 on a Debian Jessie

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to