简体   繁体   English

从 .rst 格式的 Sphinx 文件中导入多个表

[英]Importing multiple tables from files in Sphinx in .rst format

I want to import multiple tables from multiple source .csv files in a single .rst .我想从单个.rst中的多个源.csv文件导入多个表。 Something like below .rst sample:类似于下面的.rst示例:

=======
Section
=======

subsection01
------------
.. csv-table:: my_table1
   :file: my_file1.csv

subsection02
------------
.. csv-table:: my_table2
   :file: my_file2.csv

However, this gives me an error:但是,这给了我一个错误:

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

I have to mention that if I put each import block above in a separate .rst , they will just works fine.我不得不提一下,如果我将上面的每个import块放在一个单独的.rst ,它们就会正常工作。 But this is not what I need.但这不是我需要的。 The above message seems like a sphinx bug/issue to me.上面的消息对我来说似乎是一个狮身人面像的错误/问题。

Any thoughts/solutions on this?对此有何想法/解决方案?

A more recent version of Python is perhaps needed to read the pickle output :) Pickles protocol version 4 looks like it was added in Python 3.4, updating might work!可能需要更新版本的 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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM