Python 以.rst格式从Sphinx文件导入多个表
我想从单个Python 以.rst格式从Sphinx文件导入多个表,python,python-sphinx,restructuredtext,Python,Python Sphinx,Restructuredtext,我想从单个.rst中的多个源.csv文件导入多个表。类似于下面的.rst示例: ======= Section ======= subsection01 ------------ .. csv-table:: my_table1 :file: my_file1.csv subsection02 ------------ .. csv-table:: my_table2 :file: my_file2.csv 但是,这给了我一个错误: Exception occurred:
.rst
中的多个源.csv
文件导入多个表。类似于下面的.rst
示例:
=======
Section
=======
subsection01
------------
.. csv-table:: my_table1
:file: my_file1.csv
subsection02
------------
.. csv-table:: my_table2
:file: my_file2.csv
但是,这给了我一个错误:
Exception occurred:
File "/var/jenkins_home/.local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 612, in get_doctree
doctree = pickle.load(f)
ValueError: unsupported pickle protocol: 4
The full traceback has been saved in /tmp/sphinx-err-IQAuoY.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:20: recipe for target 'html' failed
make: *** [html] Error 2
Build step 'Execute shell' marked build as failure
Finished: FAILURE
发生异常:
文件“/var/jenkins_home/.local/lib/python2.7/site packages/sphinx/environment/_init__.py”,第612行,在get_doctree中
doctree=pickle.load(f)
ValueError:不支持的pickle协议:4
如果要向开发人员报告问题,则完整的回溯已保存在/tmp/sphinx-err-IQAuoY.log中。
如果是用户错误,也请报告,以便下次提供更好的错误消息。
错误报告可在以下位置的跟踪器中存档:。谢谢
Makefile:20:目标“html”的配方失败
make:**[html]错误2
生成步骤“执行shell”将生成标记为失败
完成:失败
我必须提到,如果我将上面的每个导入
块放在一个单独的.rst
中,它们就可以正常工作。但这不是我需要的。以上信息对我来说似乎是斯芬克斯的bug/问题
对此有何想法/解决方案?阅读pickle输出可能需要更新版本的Python:) Pickles协议版本4看起来像是在Python 3.4中添加的,更新可能会起作用
Exception occurred:
File "/var/jenkins_home/.local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 612, in get_doctree
doctree = pickle.load(f)
ValueError: unsupported pickle protocol: 4