numpy - Python - Sphinx: vague Import error -
i trying generate api documentation comments (in numpydoc style) in project , stuck @ vague import errors sphinx:
/home/carbolymer/workspace/si-app/doc/source/scripts.rst:10: warning: autodoc: failed import module 'scripts.backtest'; following exception raised: traceback (most recent call last): file "/usr/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 547, in import_object __import__(self.modname) file "/home/carbolymer/workspace/si-app/application/scripts/backtest.py", line 6, in <module> scipy import stats file "/usr/lib/python3.5/site-packages/scipy/__init__.py", line 64, in <module> numpy import __version__ __numpy_version__ importerror: cannot import name '__version__' /home/carbolymer/workspace/si-app/doc/source/scripts.rst:18: warning: autodoc: failed import module 'scripts.importdb'; following exception raised: traceback (most recent call last): file "/usr/lib/python3.5/site-packages/sphinx/ext/autodoc.py", line 547, in import_object __import__(self.modname) file "/home/carbolymer/workspace/si-app/application/scripts/importdb.py", line 5, in <module> si.storage.dataimport import dataimport, database_drivers, sources file "/home/carbolymer/workspace/si-app/application/si/storage/dataimport.py", line 6, in <module> si.storage.datasource.file import stooq stooqfile file "/home/carbolymer/workspace/si-app/application/si/storage/datasource/file.py", line 19, in <module> si.storage.datasource.util import correct_prices file "/home/carbolymer/workspace/si-app/application/si/storage/datasource/util.py", line 4, in <module> def correct_prices(dataframe, calendar=polishcalendar()): file "/usr/lib/python3.5/unittest/mock.py", line 917, in __call__ return _mock_self._mock_call(*args, **kwargs) file "/usr/lib/python3.5/unittest/mock.py", line 976, in _mock_call result = next(effect) stopiteration
full log:
i've tried mocking numpy.__version__
not work. have no clue lines containing polishcalendar()
- why sphinx trying mock object?
because of import errors, these files missing in documentation. how can fix this?
my build command:
make clean ; sphinx-apidoc -a -f -o ./source ../application ; make html
versions:
$ sphinx-build --version sphinx (sphinx-build) 1.5.1 $ python --version python 3.5.2
source/conf.py: http://pastebin.com/vfsix4uz
Comments
Post a Comment