Reputation: 14866
So I'm trying to work through the Plone 4 book and I copied a buildout file (from page 51) that contains the following lines:
[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')
When I try to run bin/buildout
I get the following error message:
ParsingError: File contains parsing errors: /Users/Jon/dev/pln42/buildout.cfg
[line 32]: 'PlonePlonebuildout configuration files[test]\n'
I have included some lines that come before and after the line in question so as to provide context. Since I have copied that line directly from the book, I don't know how to change it in order to make the parsing error go away.
(The source code is supposedly available online, but I have tried following the downloading instructions at Packt Publishing and they have not worked.)
Screenshot from my Kindle book:
Upvotes: 0
Views: 304
Reputation: 3548
Looks like something's gone wrong in the editing/formatting here.
You can find all of my book's source code here: http://github.com/optilude/optilux
Use the branch selector to select a chapter. You can either read it through the web, or clone/download from github.
Upvotes: 3
Reputation: 1125018
The line PlonePlonebuildout configuration files[test]
is clearly wrong; remove everything before the [test]
part of that line:
# Test runner. Run: ``bin/test`` to execute all tests
[test]
recipe = zc.recipe.testrunner
Not sure if it is your formatting on Stack Overflow or in your file, but you are also missing some indentation elsewhere:
[instance]
recipe = plone.recipe.zope2instance
http-address = 8080
user = admin:admin
verbose-security = on
eggs =
${eggs:main}
${eggs:devtools}
The lines following the eggs =
specification should be indented to mark them as the (continuing) value for the eggs
parameter. The same goes for the eggs =
line in the [test]
part:
[test]
recipe = zc.recipe.testrunner
eggs =
${eggs:test}
defaults = ['--auto-color', '--auto-progress']
Upvotes: 3