Cannot find quot;Grammar.txtquot; in python-sphinx(在python-sphinx中找不到quot;Grammar.txtquot;)
本文介绍了在python-sphinx中找不到";Grammar.txt";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Windows下尝试使用Python Sphinx生成html文档时,出现以下错误:
IOError: [Errno 2] No such file or directory:
'c:\python27\sphinx.egg\sphinx\pycode\Grammar.txt'
但是,当我打开sphinx.egg时,文件"Grammar.txt"出现了...
这是它提供的日志
# Sphinx version: 1.1.3
# Python version: 2.7.3
# Docutils version: 0.9.1 release
# Jinja2 version: 2.6 Traceback (most recent call last):
File "c:python27sphinx.eggsphinxcmdline.py", line 188, in main
warningiserror, tags)
File "c:python27sphinx.eggsphinxapplication.py", line 114, in __init__
self.setup_extension(extension)
File "c:python27sphinx.eggsphinxapplication.py", line 247, in
setup_extension
mod = __import__(extension, None, None, ['setup'])
File "c:python27sphinx.eggsphinxextautodoc.py", line 26, in <module>
File "c:python27sphinx.eggsphinxpycode\__init__.py", line 25, in <module>
File "c:python27sphinx.eggsphinxpycodepgen2driver.py", line 126, in load_grammar
g = pgen.generate_grammar(gt)
File "c:python27sphinx.eggsphinxpycodepgen2pgen.py", line 383, in generate_grammar
p = ParserGenerator(filename)
File "c:python27sphinx.eggsphinxpycodepgen2pgen.py", line 15, in __init__
stream = open(filename) IOError: [Errno 2] No such file or directory: 'c:\python27\sphinx.egg\sphinx\pycode\Grammar.txt'
有人知道为什么吗?
推荐答案
我终于找到了为什么找不到文件&Grammar.txt&。首先,我将sphinx-ickstart.exe移到了我的源文件夹中。相反,更好的方法(也是正确的做法)是从它的默认文件夹启动sphinx-ickstart.exe,然后出现以下问题:
&>输入文档的根路径。
&>文档的根路径[.]:";Path ToYourSourceFold";
在此问题中输入您的源文件夹路径。
希望这能帮助某人!
这篇关于在python-sphinx中找不到";Grammar.txt";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:在python-sphinx中找不到";Grammar.txt";
基础教程推荐
猜你喜欢
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- 求两个直方图的卷积 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 包装空间模型 2022-01-01
