Issue #210 resolved

Import issue with 0.6.17 in buildout

Tarek Ziadé
repo owner created an issue

When I try to use this in a Plone buildout, I cannot start my Zope instance anymore. Works fine when I revert to 0.6.16.

This is with zc.buildout 1.4.3 or 1.4.4, Plone 3.3.5 (+python2.4) or Plone 4.0.6.1 (with python2.6).

The buildout (created with either the plone3_buildout or plone4_buildout templates from ZopeSkel, or a client buildout that has worked fine for the past year) finished successfully. Starting the zope instance on the foreground fails with an ImportError; for example this one, but I have seen others:

Traceback (most recent call last): File "/Users/mauritsvanrees/zopes/Zope-2.10.11-final-py2.4/lib/python/OFS/Application.py", line 709, in import_product product=import(pname, global_dict, global_dict, silly) File "/Users/mauritsvanrees/shared-eggs/Products.ATContentTypes-1.3.4-py2.4.egg/Products/ATContentTypes/init.py", line 64, in ? import Products.ATContentTypes.content File "/Users/mauritsvanrees/shared-eggs/Products.ATContentTypes-1.3.4-py2.4.egg/Products/ATContentTypes/content/init.py", line 26, in ? import Products.ATContentTypes.content.link File "/Users/mauritsvanrees/shared-eggs/Products.ATContentTypes-1.3.4-py2.4.egg/Products/ATContentTypes/content/link.py", line 39, in ? from Products.ATContentTypes.content.base import registerATCT File "/Users/mauritsvanrees/shared-eggs/Products.ATContentTypes-1.3.4-py2.4.egg/Products/ATContentTypes/content/base.py", line 63, in ? from Products.CMFPlone.PloneFolder import ReplaceableWrapper File "/Users/mauritsvanrees/shared-eggs/Plone-3.3.4-py2.4.egg/Products/CMFPlone/init.py", line 215, in ? from browser import ploneview File "/Users/mauritsvanrees/shared-eggs/Plone-3.3.4-py2.4.egg/Products/CMFPlone/browser/ploneview.py", line 12, in ? from Products.CMFPlone import utils ImportError: cannot import name utils

When I go in with a pdb in this utils.py everything seems fine but then the import error just happens a bit further on, failing to import plone.app.layout. On Plone 4 an import of Shared.DC.ZRDB.Search fails. Again, with distribute 0.6.16 it works fine.

This is on Mac OS X. Possibly I have strange ways of installing python, but it has worked fine so far. Can anyone else reproduce this?


I had this same error (on import of Shared.DC.ZRDB.Search) with 0.6.17 and Plone 4.1rc2. Reverting to 0.6.16 fixed that problem (although I had upgraded to 0.6.17 in an effort to fix a seemingly unrelated issue).

This is on Fedora 8.

Comments (3)

  1. Adam Groszer

    Same here with zc.buildout 1.4.4 on windows

    D:\1>svn co svn://svn.zope.org/repos/main/z3c.recipe.paster/trunk
    D:\1\z3c.recipe.paster>python bootstrap.py
    D:\1\z3c.recipe.paster>bin\buildout.exe
    Develop: 'D:\\1\\z3c.recipe.paster\\.'
    Getting distribution for 'zope.testrunner'.
    package init file 'src\zope\testrunner\testrunner-ex\__init__.py' not found (or not a regular file)
    Creating missing __init__.py for zope.testrunner.testrunner-ex
    Got zope.testrunner 4.0.3.
    Getting distribution for 'zope.interface'.
    Got zope.interface 3.6.3.
    While:
      Installing.
      Getting section test.
      Initializing section test.
      Loading zc.buildout recipe entry zc.recipe.testrunner:default.
    
    An internal error occured due to a bug in either zc.buildout or in a
    recipe being used:
    Traceback (most recent call last):
      File "c:\home\.buildout\eggs\zc.buildout-1.4.4-py2.6.egg\zc\buildout\buildout.py", line 1683, in main
        getattr(buildout, command)(args)
      File "c:\home\.buildout\eggs\zc.buildout-1.4.4-py2.6.egg\zc\buildout\buildout.py", line 439, in install
        [self[part]['recipe'] for part in install_parts]
      File "c:\home\.buildout\eggs\zc.buildout-1.4.4-py2.6.egg\zc\buildout\buildout.py", line 987, in __getitem__
        options._initialize()
      File "c:\home\.buildout\eggs\zc.buildout-1.4.4-py2.6.egg\zc\buildout\buildout.py", line 1071, in _initialize
        recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
      File "c:\home\.buildout\eggs\zc.buildout-1.4.4-py2.6.egg\zc\buildout\buildout.py", line 1032, in _install_and_load
        req.project_name, group, entry)
      File "c:\home\.buildout\eggs\distribute-0.6.17-py2.6.egg\pkg_resources.py", line 337, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
      File "c:\home\.buildout\eggs\distribute-0.6.17-py2.6.egg\pkg_resources.py", line 2281, in load_entry_point
        return ep.load()
      File "c:\home\.buildout\eggs\distribute-0.6.17-py2.6.egg\pkg_resources.py", line 1991, in load
        entry = __import__(self.module_name, globals(),globals(), ['__name__'])
    ImportError: No module named testrunner
    
  2. Log in to comment