Buildout AttributeError: module object has no attribute __file__

Hi,
can anyone explain the following traceback to me?
I tried to removed ever custom code from buildout, nothing helps

I use an virtualenv (x-times newly installed) and pip to setup

Btw, sorry for the long Traceback

This is my buildout.cfg

[buildout]
newest = false
allow-hosts = *
allow-picked-versions = true
verbosity = 20
prefer-final = true
show-picked-versions = true
versions = versions

parts =
    instance1

extends =
    https://dist.plone.org/release/5.1.2/versions.cfg

extensions =
    zc.buildout

eggs =
    Plone
    Pillow

[instance1]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 127.0.0.1:8080
debug-mode = off
verbose-security = off

eggs =
    ${buildout:eggs}

[versions]

And this the (very) long Traceback

Traceback (most recent call last):
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/parts/instance1/bin/interpreter", line 283, in <module>
    exec(compile(__file__f.read(), __file__, "exec"))
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
    run()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/run.py", line 22, in run
    starter.prepare()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/__init__.py", line 92, in prepare
    self.startZope()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/Startup/__init__.py", line 268, in startZope
    Zope2.startup()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/__init__.py", line 47, in startup
    _startup()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/startup.py", line 120, in startup
    load_zcml()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
    load_site()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
    _context = xmlconfig.file(site_zcml)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
    include(context, name, package)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Zope2-2.13.27-py2.7.egg/OFS/metaconfigure.py", line 46, in loadProducts
    xmlconfig.include(_context, zcml, package=product)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
    processxmlfile(f, context)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
    parser.parse(src)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 220, in feed
    self._parser.Parse(data, isFinal)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 384, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
    self.context.end()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
    self.stack.pop().finish()
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
    actions = self.handler(context, **args)
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/z3c.autoinclude-0.3.7-py2.7.egg/z3c/autoinclude/zcml.py", line 51, in includeDependenciesDirective
    info = DependencyFinder(dist).includableInfo(['configure.zcml', 'meta.zcml'])
File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/z3c.autoinclude-0.3.7-py2.7.egg/z3c/autoinclude/dependency.py", line 33, in includableInfo
    os.path.dirname(module.__file__), candidate)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/parts/instance1/etc/site.zcml", line 16.2-16.23
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Products.ATContentTypes-2.3.8-py2.7.egg/Products/ATContentTypes/configure.zcml", line 18.2-18.44
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/plone.app.collection-1.2.6-py2.7.egg/plone/app/collection/configure.zcml", line 9.2-9.45
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/plone.app.querystring-1.4.8-py2.7.egg/plone/app/querystring/configure.zcml", line 11.2-11.42
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/plone.app.registry-1.7.1-py2.7.egg/plone/app/registry/configure.zcml", line 12.4-12.34
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/plone.app.registry-1.7.1-py2.7.egg/plone/app/registry/browser/configure.zcml", line 6.4-6.43
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/plone.app.z3cform-3.0.4-py2.7.egg/plone/app/z3cform/configure.zcml", line 10.2-10.41
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/plone.app.widgets-2.3.1-py2.7.egg/plone/app/widgets/configure.zcml", line 12.2-12.41
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/Products.CMFPlone-5.1.2.1-py2.7.egg/Products/CMFPlone/configure.zcml", line 15.2-15.46
    ZopeXMLConfigurationError: File "/Users/user/Projects/testproject/v2/www/instances/testproject_51/eggs/plone.app.contenttypes-1.4.10-py2.7.egg/plone/app/contenttypes/configure.zcml", line 10.2-10.37
    AttributeError: 'module' object has no attribute '__file__'

Can you try to remove the .installed.cfg file from your buildout directory and re-run buildout? Sometimes things get stuck with that.

Thank you, but I cleared my folder (except needed files, .git, buildout.cfg, requirements.txt) multiply times...
Nothing worked.

I could not reproduce the bug. Here are the steps I followed:

python --version
# Python 2.7.12
virtualenv --version
15.1.0
cd ~
virtualenv ve
cd ve
# create buildout.cfg with the contents you provided
wget https://dist.plone.org/release/5.1.2/requirements.txt
bin/pip install -r requirements.txt
bin/buildout
bin/instance1 fg

After that I logged into the ZMI and created a Plone site. Browsed the created site with no issues.

Some other things you can try:

  • Upgrade to the newest virtualenv version.
  • Make sure the created virtualenv does not inherit global installed packages.
  • Check if you have a ~/.buildout/default.cfg file. This file affects all buildouts.
    • If this is the case try to rename it, clean things up and run buildout again.
  • Use an isolated Python installation. You can achieve this by building Python from source and then using the built python executable to install pip, virtualenv and go from there.

If you don't have success maybe you could zip your virutlaenv directory and share it so we can try to inspect it. Exclude the eggs directory since it is quite big.

Ok, it seems it is one of my packages from requirements.txt.
I will try it tomorrow

My complete requirements.txt

astroid==1.6.5
autopep8==1.4
backports.functools-lru-cache==1.5
configparser==3.5.0
enum34==1.1.6
futures==3.2.0
isort==4.3.4
lazy-object-proxy==1.3.1
mccabe==0.6.1
pycodestyle==2.4.0
pylint==1.9.3
singledispatch==3.4.0.3
six==1.11.0
wrapt==1.10.11
yapf==0.24.0
setuptools==33.1.1
zc.buildout==2.9.5

The following combination does not work for me:
backports + configparser (both needed by pylint==1.9.3)

Failing requirements.txt:

backports.functools-lru-cache==1.5
configparser==3.5.0
# ---------
setuptools==33.1.1
zc.buildout==2.9.5

Can this anyone test and verify please?!
And has anyone an working configuration for pylint?

Steps to reproduce:

## python and virtualenv version does not matter!
python --version
# Python 2.7.15
virtualenv --version
# 16.0.0

wget https://dist.plone.org/release/5.1.2/requirements.txt

## add test packages to requirements.txt
echo -e "\nbackports.functools-lru-cache==1.5" >> requirements.txt
echo -e "\nconfigparser==3.5.0" >> requirements.txt

bin/pip install -r requirements.txt
bin/buildout
bin/instance1 fg

I only have setuptools, pip and zc.buildout in the virtualenv and I keep those up to date. I install pylint in the buildout.

[buildout]
-- snip --
parts +=
    pylama
-- snip --
[versions]
isort =
mccabe =
pycodestyle =
pydocstyle =
pyflakes =
pylama =
pylint = < 2.0.0
setuptools =
zc.buildout =
astroid =
plone.recipe.zope2instance = < 5.0.0
-- snip --
[pylama]
recipe = zc.recipe.egg:scripts
eggs =
    ${instance:eggs}
    ${test:eggs}
    isort
    pylama
    pylama-pylint
    setuptools

This provides me a bin/pylama I use for my linting needs and point my editor plugins to (on buildout based projects). You can do the same with just pylint too.

A pylint instance installed just to the virtualenv would not even be able to import anything from the omelette without explicit path trickery under the hood.

Thank you, I rebuild my cfg/requirements.txt for now (with pylint :wink: )

I tried the exact steps you provided, inside a virtualenv and could not reproduce the error. I started the instance and created a Plone Site. No errors :frowning:

Ok, thank you for trying - pylint moved to buidout and everything works fine...everything ok :slight_smile: