Sphinx Exception when trying to execute documentation
Hi
I am very new to sphinx so I have most likely done something wrong. However when I try to run my configuration to document my code I get the following error:
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.3\helpers\rest_runners\sphinx_runner.py", line 5, in <module>
from sphinx import cmdline
File "C:\python34\lib\site-packages\sphinx\cmdline.py", line 23, in <module>
from sphinx.application import Sphinx
File "C:\python34\lib\site-packages\sphinx\application.py", line 37, in <module>
from sphinx.builders import BUILTIN_BUILDERS
File "C:\python34\lib\site-packages\sphinx\builders\__init__.py", line 23, in <module>
from sphinx.util import i18n, path_stabilize
File "C:\python34\lib\site-packages\sphinx\util\i18n.py", line 15, in <module>
from babel.messages.pofile import read_po
File "C:\python34\lib\site-packages\babel\messages\__init__.py", line 12, in <module>
from babel.messages.catalog import *
File "C:\python34\lib\site-packages\babel\messages\catalog.py", line 23, in <module>
from babel.dates import format_datetime
File "C:\python34\lib\site-packages\babel\dates.py", line 28, in <module>
from babel.util import UTC, LOCALTZ
File "C:\python34\lib\site-packages\babel\util.py", line 278, in <module>
from babel import localtime
File "C:\python34\lib\site-packages\babel\localtime\__init__.py", line 21, in <module>
from babel.localtime._win32 import _get_localzone
File "C:\python34\lib\site-packages\babel\localtime\_win32.py", line 18, in <module>
tz_names = get_global('windows_zone_mapping')
File "C:\python34\lib\site-packages\babel\core.py", line 58, in get_global
_global_data = pickle.load(fileobj)
TypeError: an integer is required (got type str)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.3\helpers\rest_runners\sphinx_runner.py", line 7, in <module>
raise NameError("Cannot find sphinx in selected interpreter.")
NameError: Cannot find sphinx in selected interpreter.
Process finished with exit code 1
My current setup is.
Project folder structure.
app/ - Where my python main application is
plugins/plugin_name/version/ - Where stand alone python classes are which can be imported as plugins in the main application
sphinx/doc/source/ - Sphinx source folder generated by quick start.
sphinx/doc/build/ - Sphinx build folder generated by quick start.
My run configuration in PyCharm is created under Python docs.
Command = html
input = sphinx/doc/source/
output = sphinx/doc/build/
I am using Python 3.4.3
Regards
Anders
I am very new to sphinx so I have most likely done something wrong. However when I try to run my configuration to document my code I get the following error:
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.3\helpers\rest_runners\sphinx_runner.py", line 5, in <module>
from sphinx import cmdline
File "C:\python34\lib\site-packages\sphinx\cmdline.py", line 23, in <module>
from sphinx.application import Sphinx
File "C:\python34\lib\site-packages\sphinx\application.py", line 37, in <module>
from sphinx.builders import BUILTIN_BUILDERS
File "C:\python34\lib\site-packages\sphinx\builders\__init__.py", line 23, in <module>
from sphinx.util import i18n, path_stabilize
File "C:\python34\lib\site-packages\sphinx\util\i18n.py", line 15, in <module>
from babel.messages.pofile import read_po
File "C:\python34\lib\site-packages\babel\messages\__init__.py", line 12, in <module>
from babel.messages.catalog import *
File "C:\python34\lib\site-packages\babel\messages\catalog.py", line 23, in <module>
from babel.dates import format_datetime
File "C:\python34\lib\site-packages\babel\dates.py", line 28, in <module>
from babel.util import UTC, LOCALTZ
File "C:\python34\lib\site-packages\babel\util.py", line 278, in <module>
from babel import localtime
File "C:\python34\lib\site-packages\babel\localtime\__init__.py", line 21, in <module>
from babel.localtime._win32 import _get_localzone
File "C:\python34\lib\site-packages\babel\localtime\_win32.py", line 18, in <module>
tz_names = get_global('windows_zone_mapping')
File "C:\python34\lib\site-packages\babel\core.py", line 58, in get_global
_global_data = pickle.load(fileobj)
TypeError: an integer is required (got type str)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.3\helpers\rest_runners\sphinx_runner.py", line 7, in <module>
raise NameError("Cannot find sphinx in selected interpreter.")
NameError: Cannot find sphinx in selected interpreter.
Process finished with exit code 1
My current setup is.
Project folder structure.
app/ - Where my python main application is
plugins/plugin_name/version/ - Where stand alone python classes are which can be imported as plugins in the main application
sphinx/doc/source/ - Sphinx source folder generated by quick start.
sphinx/doc/build/ - Sphinx build folder generated by quick start.
My run configuration in PyCharm is created under Python docs.
Command = html
input = sphinx/doc/source/
output = sphinx/doc/build/
I am using Python 3.4.3
Regards
Anders
Please sign in to leave a comment.
Are you using a virtual environment for your project?
Finally, are you able to run Sphinx correctly from outside of PyCharm?