pombreda / pysal

Automatically exported from code.google.com/p/pysal
Other
0 stars 0 forks source link

core module imports not found in building sphinx docs #212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
docs build, but tracebacks about not found core modules are generated

Original issue reported on code.google.com by sjsrey on 20 Jun 2012 at 4:21

GoogleCodeExporter commented 9 years ago
example:

Traceback (most recent call last):cg/locators                                   

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
    __import__(self.modname)
ImportError: No module named IntervalTree
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
    __import__(self.modname)
ImportError: No module named IntervalTree
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
    __import__(self.modname)
ImportError: No module named IntervalTree
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
    __import__(self.modname)
ImportError: No module named IntervalTree
Traceback (most recent call last):core/FileIO                                   

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
    __import__(self.modname)
ImportError: No module named FileIO
Traceback (most recent call last):core/IOHandlers/arcgis_dbf                    

  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/ext/autodoc.py", line 321, in import_object
    __import__(self.modname)
ImportError: No module named ArcGISDbfIO
^Cmake: *** [html] Error 1library/core/IOHandlers/arcgis_swm           

Original comment by sjsrey on 13 Jul 2012 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by sjsrey on 13 Jul 2012 at 6:29

GoogleCodeExporter commented 9 years ago
The problem seems to be with Class that define Subclasses.

For example, class IntervalTree defines and class Node.  Sphinx autodoc trys to 
import IntervalTree in order to document Node.

I don't see an obvious solution short of manually documenting these classes.  
This does not appear to be critical as sphinx does produce the docs, despite 
the errors. 

Original comment by schmi...@gmail.com on 24 Jul 2012 at 3:13

GoogleCodeExporter commented 9 years ago
In all cases the problem was triggered by nested classes. Also in all cases the 
nested class should have been private.  By adding an "_" to the beginning of 
nested class names sphinx ignores these. See r1280

Original comment by schmi...@gmail.com on 24 Jul 2012 at 4:08