0
我triyng用獅身人面像來記錄我的django項目,但我遇到了一些麻煩。獅身人面像在Anaconda下運行,但我的Django項目在Python 3.5.2下
當我運行make html
命令我得到這個錯誤:
/home/santoryu/richiestaTesi/docs/models/models.rst:3: WARNING: autodoc:
failed to import module u'myapp.models'; the following exception was
raised:
Traceback (most recent call last):
File "/home/santoryu/anaconda2/lib/python2.7/site-packages/Sphinx-
1.5.6-py2.7.egg/sphinx/ext/autodoc.py", line 560, in import_object
__import__(self.modname)
File "/home/santoryu/richiestaTesi/myapp/models.py", line 8
SyntaxError: Non-ASCII character '\xc3' in file
/home/santoryu/richiestaTesi/myapp/models.py on line 8, but no encoding
declared; see http://python.org/dev/peps/pep-0263/ for details
很明顯的錯誤發生,因爲蟒蛇非ASCII字符本身不支持,但在Python 3.5.2他們。所以我猜如何強制Python 3.5.2執行Sphinx?
項目被記錄python 3特定? –