Sphinx / sys.path

M

mining.facts

Hi,

I figure out how it works with sphinx documentation. But I'm stucked
in the sys.path issue?

sys.path.insert(0, '/home/chris/projekte/dev/testmodule')

/home/chris/projekte/dev/testmodule/doc/source/code.rst:4: WARNING: autodoccan't import/find module 'myproject', it reported error: "No module named useful_1", please check your spelling and sys.path

Thanks in advance
Christian


+-- doc
|   +-- build
|   |   +-- doctrees
|   |   |   +-- code.doctree
|   |   |   +-- environment.pickle
|   |   |   +-- index.doctree
|   |   +-- genindex.html
|   |   +-- html
|   |   |   +-- code.html
|   |   |   +-- genindex.html
|   |   |   +-- index.html
|   |   |   +-- objects.inv
|   |   |   +-- py-modindex.html
|   |   |   +-- search.html
|   |   |   +-- searchindex.js
|   |   |   +-- _sources
|   |   |   |   +-- code.txt
|   |   |   |   +-- index.txt
|   |   |   +-- _static
|   |   |   +-- ajax-loader.gif
|   |   |   +-- basic.css
|   |   |   +-- comment-bright.png
|   |   |   +-- comment-close.png
|   |   |   +-- comment.png
|   |   |   +-- default.css
|   |   |   +-- doctools.js
|   |   |   +-- down.png
|   |   |   +-- down-pressed.png
|   |   |   +-- file.png
|   |   |   +-- jquery.js
|   |   |   +-- minus.png
|   |   |   +-- plus.png
|   |   |   +-- pygments.css
|   |   |   +-- searchtools.js
|   |   |   +-- sidebar.js
|   |   |   +-- underscore.js
|   |   |   +-- up.png
|   |   |   +-- up-pressed.png
|   |   |   +-- websupport.js
|   |   +-- index.html
|   |   +-- objects.inv
|   |   +-- search.html
|   |   +-- searchindex.js
|   |   +-- _sources
|   |   |   +-- index.txt
|   |   +-- _static
|   |   +-- ajax-loader.gif
|   |   +-- basic.css
|   |   +-- comment-bright.png
|   |   +-- comment-close.png
|   |   +-- comment.png
|   |   +-- default.css
|   |   +-- doctools.js
|   |   +-- down.png
|   |   +-- down-pressed.png
|   |   +-- file.png
|   |   +-- jquery.js
|   |   +-- minus.png
|   |   +-- plus.png
|   |   +-- pygments.css
|   |   +-- searchtools.js
|   |   +-- sidebar.js
|   |   +-- underscore.js
|   |   +-- up.png
|   |   +-- up-pressed.png
|   |   +-- websupport.js
|   +-- make.bat
|   +-- Makefile
|   +-- source
|   +-- code.rst
|   +-- conf.py
|   +-- index.rst
|   +-- _static
|   +-- _templates
+-- myproject
|   +-- __init__.py
|   +-- __init__.pyc
|   +-- usefuel1.py
|   +-- usefuel1.pyc
|   +-- usefuel2.py
|   +-- usefuel2.pyc
+-- README
+-- setup.py
+-- tests
 
M

mining.facts

So now it works, but taking my project get some trouble. I use in MyData my ConfigParser Class for configuration issues. The project.ini file is in /project and has some entries.

[Logging]
my_data:MyData.py#/tmp/MyData.log#logging.WARN

I guess Sphinx has trouble to load the ini-file!?

Thanks for help
Christian

File "/usr/local/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
__import__(self.modname)
File "/home/chris/projekte/dev/my/module/project/MyData.py", line 17, in <module>
vec = conf.ConfigSectionMap('Logging')['my_data'].split('#')

/home/chris/projekte/dev/my/module/doc/source/index.rst:42: WARNING: autodoc can't import/find module 'MyData', it reported error: "No section: 'Logging'", please check your spelling and sys.path
 

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top