[Grok-dev] Wierd Thing: Grok Groping All Modules?

Vincent Fretin vincent.fretin at gmail.com
Sun May 24 03:16:05 EDT 2009


On Sun, May 24, 2009 at 9:03 AM, Vincent Fretin
<vincent.fretin at gmail.com> wrote:
> On Ubuntu 8.10 with Python 2.4 with Plone 3.3rc3 which ships with
> z3c.autoinclude 0.3.1
> $ apt-get install python-uniconvertor
> plonenext/3.3$ bin/instance fg
> Oh I can't reproduce it with plonenext. Oh it's normal, Plone 3.3 only
> use plugins and I don't have one here :-)
>
> I go in my customer buildout then,
> here I have a Products.extranetprivr which use includeDependencies in
> configure.zcml:
> $ bin/instance fg
> ERROR: -C file is not found!
>
> UniConvertor 1.1.2
>
> USAGE: uniconvertor [INPUT FILE] [OUTPUT FILE]
>
> Converts one vector graphics format to another using sK1 engine.
> sK1 Team (http://sk1project.org), copyright (C) 2007,2008 by Igor E. Novikov
>
>  Allowed input formats:
>     AI  - Adobe Illustrator files (postscript based)
>     CDR - CorelDRAW Graphics files (7-X3,X4 versions)
>     CDT - CorelDRAW templates files (7-X3 versions)
>     CCX - Corel Compressed Exchange files
>     CMX - Corel Presentation Exchange files (CMX1 format)
>     SVG - Scalable Vector Graphics files
>     FIG - XFig files
>     CGM - Computer Graphics Metafile files
>     AFF - Draw files
>     WMF - Windows Metafile files
>     SK  - Sketch/Skencil files
>     SK1 - sK1 vector graphics files
>
>  Allowed output formats:
>     AI  - Adobe Illustrator files (postscript based)
>     SVG - Scalable Vector Graphics files
>     CGM - Computer Graphics Metafile files
>     WMF - Windows Metafile files
>     SK  - Sketch/Skencil files
>     SK1 - sK1 vector graphics files
>
> Example: uniconvertor drawing.cdr drawing.svg
>
>
> 2009-05-24 08:49:40 ERROR Application Couldn't install Five
> Traceback (most recent call last):
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/OFS/Application.py",
> line 786, in install_product
>    initmethod(context)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/Products/Five/__init__.py",
> line 28, in initialize
>    zcml.load_site()
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/Products/Five/zcml.py",
> line 53, in load_site
>    _context = xmlconfig.file(file)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 579, in file
>    include(context, name, package)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 515, in include
>    processxmlfile(f, context)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 370, in processxmlfile
>    parser.parse(src)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 107, in parse
>    xmlreader.IncrementalParser.parse(self, source)
>  File "/usr/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse
>    self.feed(buffer)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 207, in feed
>    self._parser.Parse(data, isFinal)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 348, in end_element_ns
>    self._cont_handler.endElementNS(pair, None)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 349, in endElementNS
>    self.context.end()
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/config.py",
> line 544, in end
>    self.stack.pop().finish()
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/config.py",
> line 692, in finish
>    actions = self.handler(context, **args)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 515, in include
>    processxmlfile(f, context)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 370, in processxmlfile
>    parser.parse(src)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 107, in parse
>    xmlreader.IncrementalParser.parse(self, source)
>  File "/usr/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse
>    self.feed(buffer)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 207, in feed
>    self._parser.Parse(data, isFinal)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 348, in end_element_ns
>    self._cont_handler.endElementNS(pair, None)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 349, in endElementNS
>    self.context.end()
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/config.py",
> line 544, in end
>    self.stack.pop().finish()
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/config.py",
> line 692, in finish
>    actions = self.handler(context, **args)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 515, in include
>    processxmlfile(f, context)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 370, in processxmlfile
>    parser.parse(src)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 107, in parse
>    xmlreader.IncrementalParser.parse(self, source)
>  File "/usr/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse
>    self.feed(buffer)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 207, in feed
>    self._parser.Parse(data, isFinal)
>  File "/usr/lib/python2.4/xml/sax/expatreader.py", line 348, in end_element_ns
>    self._cont_handler.endElementNS(pair, None)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/xmlconfig.py",
> line 349, in endElementNS
>    self.context.end()
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/config.py",
> line 544, in end
>    self.stack.pop().finish()
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/configuration/config.py",
> line 692, in finish
>    actions = self.handler(context, **args)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/eggs/z3c.autoinclude-0.3.1-py2.4.egg/z3c/autoinclude/zcml.py",
> line 51, in includeDependenciesDirective
>    info = DependencyFinder(dist).includableInfo(['configure.zcml',
> 'meta.zcml'])
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/eggs/z3c.autoinclude-0.3.1-py2.4.egg/z3c/autoinclude/dependency.py",
> line 24, in includableInfo
>    module = resolve(dotted_name)
>  File "/home/vincentfretin/workspace/ExtranetPRIVR/parts/zope2/lib/python/zope/dottedname/resolve.py",
> line 32, in resolve
>    found = __import__(used)
>  File "/usr/lib/python2.4/site-packages/uniconvertor/__init__.py",
> line 54, in ?
>    sys.exit(1)
> SystemExit: 1
>
> I included import pdb;pdb.set_trace() after line 22 in
> /home/vincentfretin/workspace/ExtranetPRIVR/eggs/z3c.autoinclude-0.3.1-py2.4.egg/z3c/autoinclude/dependency.py
> dist_manager.dottedNames() returns
> ['deskbar', 'uniconvertor', 'Pyrex', 'DistUpgrade', 'Alacarte',
> 'launchpadbugs', 'telepathy', 'cairo', 'translate', 'PIL',
> 'NvidiaDetector', 'pymsn', 'UpdateManager', 'apt', 'aptsources',
> 'lxml', 'pyatspi', 'numpy', 'softwareproperties', 'setuptools',
> 'Crypto', 'XKit', 'butterfly', 'enchant', 'pysqlite2']
>
> get_provider(req)
> returns
> setuptools 0.6c9 (/usr/lib/python2.4/site-packages)
>
> --
> Vincent Fretin
>
and in the for loop above
self.context.requires()
returns
[Requirement.parse('setuptools'),
Requirement.parse('extranetprivr.portlet.addevent'),
Requirement.parse('extranetprivr.theme'),
Requirement.parse('Products.extranetprivr')]

Oh, interresing.
self.context is here extranetprivr.policy
In src/extranetprivr.policy/setup.py I have
      install_requires=[
          'setuptools',
          'extranetprivr.portlet.addevent',
          'extranetprivr.theme',
          'Products.extranetprivr',
          # -*- Extra requirements: -*-
      ],

and <includeDependencies package="." /> in
src/extranetprivr.policy/extranetprivr/policy/configure.zcml

The problem seems reproducible if you don't have your own copy of
setuptools in your buildout, but your buildout use the one from the
system (installed with apt-get install python-setuptools), and Ubuntu
8.10 ships will latest setuptools 0.6c9, so buildout don't have to
upgrade it here.

-- 
Vincent Fretin


More information about the Grok-dev mailing list