Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/338.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何使用Sphinx在reStructuredText中包含plantuml文件_Python_Python Sphinx_Restructuredtext_Plantuml - Fatal编程技术网

Python 如何使用Sphinx在reStructuredText中包含plantuml文件

Python 如何使用Sphinx在reStructuredText中包含plantuml文件,python,python-sphinx,restructuredtext,plantuml,Python,Python Sphinx,Restructuredtext,Plantuml,我有一个plantuml文件composite.puml,包含以下内容: package composite { class Letter { + __init__(char: str) # print_this_before() } 我尝试将其包含在重构的文本文档中(使用sphinxcontrib.plantuml插件): 但是当运行makehtml Running Sphinx v2.4.1 /Users/jve23941 loading pickled envir

我有一个plantuml文件
composite.puml
,包含以下内容:

package composite {
  class Letter {
    + __init__(char: str)
    # print_this_before()
  }
我尝试将其包含在重构的文本文档中(使用
sphinxcontrib.plantuml
插件):

但是当运行
makehtml

Running Sphinx v2.4.1
/Users/jve23941
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 10 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] structural_patterns/composite
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:51: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:52: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:54: WARNING: Unexpected indentation.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:57: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:59: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:61: WARNING: Unexpected indentation.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:63: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:65: WARNING: Unexpected indentation.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:65: WARNING: Inline emphasis start-string without end-string.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:66: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:67: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:69: WARNING: Unexpected indentation.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:69: WARNING: Inline emphasis start-string without end-string.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:70: WARNING: Inline emphasis start-string without end-string.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:71: WARNING: Bullet list ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:72: WARNING: Block quote ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:73: WARNING: Definition list ends without a blank line; unexpected unindent.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:73: WARNING: Inline substitution_reference start-string without end-string.
/Users/jve23941/workspace/python-design-patterns/docs/structural_patterns/composite.rst:73: WARNING: Undefined substitution referenced: "> LetterComposite Sentence --".
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] structural_patterns/index
generating indices...  genindex py-modindexdone
highlighting module code... [100%] python_design_patterns.composite
writing additional pages...  search/Users/jve23941/workspace/python-design-patterns/.venv/lib/python3.8/site-packages/sphinx_rtd_theme/search.html:21: RemovedInSphinx30Warning: To modify script_files in the theme is deprecated. Please insert a <script> tag directly in your theme instead.
  {% endblock %}
done
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 19 warnings.

The HTML pages are in _build/html.
运行Sphinx v2.4.1
/用户/jve23941
正在加载酸洗环境。。。完成
生成[mo]:0个过期采购订单文件的目标
building[html]:10个过期源文件的目标
更新环境:添加0,更改1,删除0
阅读资料。。。[100%]结构/复合材料
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:51:警告:项目符号列表结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:52:警告:定义列表结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:54:警告:意外缩进。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:57:警告:项目符号列表结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python design patterns/docs/structural_patterns/composite.rst:59:警告:块引号结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:61:警告:意外缩进。
/Users/jve23941/workspace/python design patterns/docs/structural_patterns/composite.rst:63:警告:块引号结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:65:警告:意外缩进。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:65:WARNING:Inline-emphasis-start-string不带结束字符串。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:66:警告:项目符号列表结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python design patterns/docs/structural_patterns/composite.rst:67:警告:块引号结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:69:警告:意外缩进。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:69:警告:内联强调起始字符串,不带结束字符串。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:70:警告:内联强调起始字符串,不带结束字符串。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:71:警告:项目符号列表结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python design patterns/docs/structural_patterns/composite.rst:72:警告:块引号结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:73:警告:定义列表结束时没有空行;出人意料的无知。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:73:WARNING:Inline substitution_引用开始字符串,但没有结束字符串。
/Users/jve23941/workspace/python设计模式/docs/structural_patterns/composite.rst:73:警告:引用了未定义的替换:“>LetterComposite语句--”。
正在查找现在过时的文件。。。找不到
酸洗环境。。。完成
正在检查一致性。。。完成
正在准备文档。。。完成
正在写入输出。。。[100%]结构模式/指数
正在生成索引。。。genindex py modindexdone
突出显示模块代码。。。[100%]python_design_patterns.composite
正在编写附加页。。。search/Users/jve23941/workspace/python design patterns/.venv/lib/python3.8/site packages/sphinx\u rtd\u theme/search.html:21:removedinsphinx30警告:不推荐修改主题中的脚本文件。请直接在主题中插入标记。
{%endblock%}
完成
正在复制静态文件。。。完成
正在复制额外文件。。。完成
正在转储英文搜索索引(代码:en)。。。完成
正在转储对象清单。。。完成
生成成功,19个警告。
HTML页面位于_build/HTML中。
我认为这是因为Sphinx无法处理我放在plantuml文件中的内容


如何包含plantuml文件使其工作

外部文件的包含不应该像下面那样吗

.. uml:: composite.puml

外部文件的包含不应该像下面那样吗

.. uml:: composite.puml