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

2009-05-05 Thread Jürgen Herrmann
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:

try:
ignored = __import__(package)
+print "ignored: %r" % ignored
except ImportError, e:
raise ZConfig.SchemaResourceError(
"could not load package %s: %s" % (package, str(e)),
filename=file,
package=package)
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: 
pkg: 
ignored: 
pkg: 

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:  #xlh...@irc.quakenet.org

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


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

2009-05-04 Thread Shane Hathaway
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

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )