You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building my instance (roughly Plone 4.3.3, I admit, but that's another story), I got a "ValueError: ('Invalid zcml', '#')"; apparently there was something wrong with one of my packages, but the exception doesn't give a hint about neither the zcml file (if any) nor the package which contains the error.
Generated interpreter '/opt/zope/instances/my-instance/parts/instance/bin/interpreter'.
While:
Installing instance.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/opt/zope/instances/my-instance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2127, in main
getattr(buildout, command)(args)
File "/opt/zope/instances/my-instance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 797, in install
installed_files = self[part]._call(recipe.install)
File "/opt/zope/instances/my-instance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1557, in _call
return f()
File "/opt/zope/common/eggs/plone.recipe.zope2instance-4.4.0-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 142, in install
self.build_package_includes()
File "/opt/zope/common/eggs/plone.recipe.zope2instance-4.4.0-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 780, in build_package_includes
raise ValueError('Invalid zcml', orig)
ValueError: ('Invalid zcml', '#')
(I'm afraid I'm not able to provide a simple example which reproduces the problem; but see below.)
I found the package loop var (loop in line 760 of plone/recipe/zope2instance/init.py) to contain a simple '#'; thus, some tool of some version which is supposed to generate package names does inbetween yield a '#' when it runs into a line comment.
My suggestion would be to simply continue for now when that hash "package" is found; this would improve the situation quite a lot. It can't do any harm, right?
With this little change I was able to build my instance.
Of course, someone with some insight might be able to improve the error exception a lot, including useful information about the source of the problem.
The text was updated successfully, but these errors were encountered:
Ok, I can reproduce the problem. It occurs when there is a (wrong) line comment (with leading space before the #) in the zcml assignment. The words following the hash sign are considered "packages" as well; thus, we'll need to raise an error (with an improved message) indeed, rather than just continue.
I reproduced this with zc.buildout 2.10.0 and 2.11.4.
When the hash sign is not followed by whitespace, the adjacent "word" is part of that "package" name as well.
When building my instance (roughly Plone 4.3.3, I admit, but that's another story), I got a "
ValueError: ('Invalid zcml', '#')
"; apparently there was something wrong with one of my packages, but the exception doesn't give a hint about neither thezcml
file (if any) nor the package which contains the error.(I'm afraid I'm not able to provide a simple example which reproduces the problem; but see below.)
I found the
package
loop var (loop in line 760 of plone/recipe/zope2instance/init.py) to contain a simple'#'
; thus, some tool of some version which is supposed to generate package names does inbetween yield a'#'
when it runs into a line comment.My suggestion would be to simply
continue
for now when that hash "package" is found; this would improve the situation quite a lot. It can't do any harm, right?With this little change I was able to build my instance.
Of course, someone with some insight might be able to improve the error exception a lot, including useful information about the source of the problem.
The text was updated successfully, but these errors were encountered: