I am in the process of trying out PyCharm, and have moved my project into it. I am documenting with the above (see subject) configuration. I moved it into PyCharm, and now am trying to build the documentation within PyCharm. While this works perfectly fine when run on the command line, when trying to build from inside PyCharm I always get some encoding error the first time it encounters a non-ASCII character in a docstring of a Python file, while it perfectly well works with non-ASCII chars in the .rst files themselves. I've even changed the encoding manually in the preferences of PyCharm (File Encodings) so that all .py files are set up as UTF-8, but to no avail. Is there any reason why PyCharm has some encoding error when building Sphinx 1.1pre documentation for Python 3(.1) when a source code file's docstring I include with autodoc contains non-ASCII characters?
At least on my machine, I can reproduce this error always: create a new project and set up Sphinx. Create a Python source-code file and put a non-ASCII character into the docstring of a dummy function inside it. Include the docstring with autodoc, e.g., in the default index.rst:
.. automodule:: test
Now I alwyas get, for my Sphinx builds, the following output in the PyCharm console:
/System/Library/Frameworks/Python.framework/Versions/3.1/bin/sphinx-build /Users/fleitner/PycharmProjects/Tutorial/doc doc/_build
Running Sphinx v1.1pre
loading pickled environment... done
No builder selected, using default: html
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] index
'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)
Process finished with exit code 1
Any help or suggestions would be greatly appreciated!