python - 从 .rst 格式的 Sphinx 文件中导入多个表
问题描述
我想.csv
在单个.rst
. 类似于下面的.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
我不得不提到,如果我将import
上面的每个块放在一个单独的.rst
中,它们就会正常工作。但这不是我需要的。上面的消息对我来说似乎是一个狮身人面像的错误/问题。
对此有任何想法/解决方案吗?
解决方案
可能需要更新版本的 Python 来读取 pickle 输出 :) 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
推荐阅读
- reactjs - react-bootstrap 表单按钮在第一次点击时不提交
- postgresql - ECS 中的 PostgreSQL:'致命:角色“root”不存在'
- powershell - Powershell用括号将变量传递给其他变量
- c# - 使用字符串中的密钥通过 SSH.NET 对 SFTP 进行身份验证时出现“无效的私钥文件”
- trello - 查找谁在 Trello Boad 中创建了卡片
- regex - 通过 JMX 为 Druid 进行 mBean 模式匹配
- jenkins - 发布关于 Jenkins 的 HTML 报告不起作用
- python - 弄清楚如何使用 python 压缩文件/文件夹
- sql - SQL IF ELSE 后跟 INSERT
- python - Peewee:如何做 select().dicts() 维护外国领域