Python - Sphinx 添加图片时报错
在chapter1.rst文件中,我有以下内容:
TEST
****
* Test1
.. image:: ../images/snap.png
当我运行sphinx-build(Sphinx 1.0.7)时,出现了这个错误:
发生异常:文件 "/usr/lib/python2.6/posixpath.py",第70行,在join中,路径 += '/' + b UnicodeDecodeError: 'ascii' 编码无法解码字节 0xc3 在位置 15: 序号不在范围内(128)
1 个回答
1
可能你使用的路径 ../images/snap.png 里面没有任何ASCII字符。试着把你的项目路径改成只有英文的路径,然后再试一次。