Ploneconf.theme as addon in source directory xml error

Hi, I uploaded theme to src/ directory in my production version of Phone 5.1.2, but I receive error after enable the theme:

2018-07-10 20:21:32 ERROR plone.transformchain Unexpected error whilst trying to apply transform chain
Traceback (most recent call last):
File "/home/pablo_rosales/Plone/buildout-cache/eggs/plone.transformchain-1.2.2-py2.7.egg/plone/transformchain/transformer.py", line 50, in call
newResult = handler.transformIterable(result, encoding)
File "/home/pablo_rosales/Plone/buildout-cache/eggs/plone.app.theming-2.0.3-py2.7.egg/plone/app/theming/transform.py", line 153, in transformIterable
transform = self.setupTransform(runtrace=runtrace)
File "/home/pablo_rosales/Plone/buildout-cache/eggs/plone.app.theming-2.0.3-py2.7.egg/plone/app/theming/transform.py", line 94, in setupTransform
runtrace=runtrace
File "/home/pablo_rosales/Plone/buildout-cache/eggs/plone.app.theming-2.0.3-py2.7.egg/plone/app/theming/utils.py", line 612, in compileThemeTransform
runtrace=runtrace,
File "/home/pablo_rosales/Plone/buildout-cache/eggs/diazo-1.2.8-py2.7.egg/diazo/compiler.py", line 141, in compile_theme
read_network=read_network,
File "/home/pablo_rosales/Plone/buildout-cache/eggs/diazo-1.2.8-py2.7.egg/diazo/rules.py", line 293, in process_rules
rules_doc = etree.parse(rules, parser=rules_parser)
File "src/lxml/etree.pyx", line 3444, in lxml.etree.parse (src/lxml/etree.c:83185)
File "src/lxml/parser.pxi", line 1834, in lxml.etree._parseDocument (src/lxml/etree.c:120757)
File "src/lxml/parser.pxi", line 1860, in lxml.etree._parseDocumentFromURL (src/lxml/etree.c:121104)
File "src/lxml/parser.pxi", line 1764, in lxml.etree._parseDocFromFile (src/lxml/etree.c:120012)
File "src/lxml/parser.pxi", line 1161, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/etree.c:114561)
File "src/lxml/parser.pxi", line 598, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/etree.c:107738)
File "src/lxml/parser.pxi", line 709, in lxml.etree._handleParseResult (src/lxml/etree.c:109447)
File "src/lxml/parser.pxi", line 636, in lxml.etree._raiseParseError (src/lxml/etree.c:108258)
IOError: Error reading file '/++theme++netizen/rules.xml': failed to load external entity "/++theme++netizen/rules.xml"

Please help

There is a problem with /++theme++netizen/rules.xml. I do not know precisely what this is: maybe directly your diazo rules; maybe something included into your diazo rules.

The reference looks strange: lxml (the utility parsing the file) is able to handle file names and urls and resolves relative references with respect to the parent. Starting with /, lxml likely does not interpret it as a relative reference; lacking a protocol prefix, lxml treats it as a filename - and rightfully cannot find such a file. Try to convert the reference into a relative one (omit the slash) or turn it into a real url.

Thanks for help. I found the bug. There was an old version of the theme created by web interface as copy of Barcelona theme, but it was removed. I changed the name of theme and it is ok now. How I can fully remove theme?