所以我試圖通過Plone 4書,我複製了包含以下行的構建文件(第51頁):Plone - 在buildout.cfg中的解析錯誤 - 「PlonePlonebuildout配置文件[測試]」
[instance]
recipe = plone.recipe.zope2instance
http-address = 8080
user = admin:admin
verbose-security = on
eggs =
${eggs:main}
${eggs:devtools}
# Test runner. Run: ``bin/test`` to execute all tests
PlonePlonebuildout configuration files[test]
recipe = zc.recipe.testrunner
eggs =
${eggs:test}
defaults = ['--auto-color', '--auto-progress']
# Coverage report generator.
# Run: ``bin/test --coverage=coverage`` # and then: ``bin/coveragereport``
[coverage-report]
recipe = zc.recipe.egg
eggs = z3c.coverage
scripts = coveragereport
arguments = ('parts/test/coverage', 'coverage')
當我嘗試運行bin/buildout
我收到以下錯誤信息:
ParsingError: File contains parsing errors: /Users/Jon/dev/pln42/buildout.cfg
[line 32]: 'PlonePlonebuildout configuration files[test]\n'
我已經包括進來之前,問題中的行之後,以提供上下文一些行。由於我直接從本書複製了該行,因此我不知道如何更改它以使解析錯誤消失。
(源代碼是假想在網上發佈,但我已經試過以下在年底Packt出版的下載說明,他們都沒有奏效。)
截圖來自我的Kindle書:
謝謝。我正在看這本書的Kindle版本,所以也許它搞砸了格式 - 我添加了一個截圖。 – jononomo