[Zope-dev] zope2.12.a04 / relstorage / zodbconvert.py errors

Jürgen Herrmann Juergen.Herrmann at XLhost.de
Tue May 5 06:17:23 EDT 2009

Shane Hathaway wrote:
> Jürgen Herrmann wrote:
> > ZConfig.SchemaResourceError: import name does not refer to a package
> >   Package name: 'relstorage'
> >   File name: 'component.xml'
> >   Package path: None
> I need to make a new release of RelStorage before this will work.
> RelStorage 1.1.3 does not work with ZODB 3.9, but the current RelStorage
> trunk does.  I intend to package and release a compatible version today
> or tomorrow.
> FWIW, I suspect ZConfig is attempting to import relstorage and getting
> an ImportError due to the incompatibility, but then ZConfig is
> converting the ImportError into a strange SchemaResourceError.  It would
> be much better if ZConfig just propagated the ImportError.
> Shane

hi shane, i don't think so.
i modified ZConfig/loader.py, lines 203 and following:

            ignored = __import__(package)
+            print "ignored: %r" % ignored
        except ImportError, e:
            raise ZConfig.SchemaResourceError(
                "could not load package %s: %s" % (package, str(e)),
        pkg = sys.modules[package]
+        print "pkg: %r" % pkg
        if not hasattr(pkg, "__path__"):
            raise ZConfig.SchemaResourceError(
                "import name does not refer to a package",
                filename=file, package=package)
        return "package:%s:%s" % (package, file)

the debug prints:
ignored: <module 'ZODB' from
pkg: <module 'ZODB' from
ignored: <module 'relstorage' from
pkg: <module 'relstorage' from

so the imports seem to work fine, however pkg has __path__ attribute missing!

maybe that will help with debugging? btw. i also tried relstorage trunk
(did a svn co and replace the egg's files with the checkout files),
but that did NOT help.

best regards, jürgen herrmann
>> XLhost.de - eXperts in Linux hosting ® <<

XLhost.de GmbH
Jürgen Herrmann, Geschäftsführer
Boelckestrasse 21, 93051 Regensburg, Germany

Geschäftsführer: Volker Geith, Jürgen Herrmann
Registriert unter: HRB9918
Umsatzsteuer-Identifikationsnummer: DE245931218

Fon:  +49 (0)700 XLHOSTDE [0700 95467833]
Fax:  +49 (0)700 XLHOSTDE [0700 95467833]

WEB:  http://www.XLhost.de
IRC:  #XLhost at irc.quakenet.org

More information about the Zope-Dev mailing list