Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.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
Restructuredtext pelican/rst2html代码块错误_Restructuredtext_Pelican - Fatal编程技术网

Restructuredtext pelican/rst2html代码块错误

Restructuredtext pelican/rst2html代码块错误,restructuredtext,pelican,Restructuredtext,Pelican,这段重新构造的文本(正在清理,代码是前面和后面的文本) 由rst2html正确构建,但当我尝试使用Pelican(Pelican内容命令)处理它时,会生成以下错误: (错误/3)“代码块”指令中出现错误:需要1个参数,0 供应 我怎样才能解决这个问题?我尝试了各种缩进,在代码块和实际代码之间有空行和无空行…为了回答这个问题,我可以解释mzjn的评论。将Python添加到行中..代码块解决了问题。如何。。代码块::python?代码看起来像Python。谢谢,现在可以工作了。我认为它默认为pyth

这段重新构造的文本(正在清理,代码是前面和后面的文本)

由rst2html正确构建,但当我尝试使用Pelican(Pelican内容命令)处理它时,会生成以下错误:

(错误/3)“代码块”指令中出现错误:需要1个参数,0 供应


我怎样才能解决这个问题?我尝试了各种缩进,在代码块和实际代码之间有空行和无空行…

为了回答这个问题,我可以解释mzjn的评论。将Python添加到行中..代码块解决了问题。

如何
。。代码块::python
?代码看起来像Python。谢谢,现在可以工作了。我认为它默认为python。我现在更清楚了。。。
    Cleaning up...

.. code-block::

    from sqlobject import StringCol, SQLObject, ForeignKey, sqlhub, connectionForURI

    sqlhub.processConnection = connectionForURI('sqlite:/:memory:')

    class Person(SQLObject):
        name = StringCol()
        class Address(SQLObject):
        address = StringCol()
        person = ForeignKey('Person')

        Person.createTable()
        Address.createTable()

The code