簡體   English   中英

從 .rst 格式的 Sphinx 文件中導入多個表

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

我想從單個.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

我不得不提一下,如果我將上面的每個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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM