Re: [Zope-dev] zope2.12.a04 / relstorage / zodbconvert.py errors
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: module 'ZODB' from '/home/xlhost/zope/lib/python2.4/site-packages/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/__init__.pyc' pkg: module 'ZODB' from '/home/xlhost/zope/lib/python2.4/site-packages/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/__init__.pyc' ignored: module 'relstorage' from '/home/xlhost/zope/lib/python2.4/site-packages/RelStorage-1.1.3-py2.4.egg/relstorage/relstorage.pyc' pkg: module 'relstorage' from '/home/xlhost/zope/lib/python2.4/site-packages/RelStorage-1.1.3-py2.4.egg/relstorage/relstorage.pyc' 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 )
[Zope-dev] zope2.12.a04 / relstorage / zodbconvert.py errors
i successfully installed zope 2.12.0a4 via easy_install today. startup and functionality is fine. i installed relstorage via easy_install also, but shipped zodbconvert.py fails with the following traceback: Traceback (most recent call last): File ./lib/python2.4/site-packages/RelStorage-1.1.3-py2.4.egg/relstorage/zodbconvert.py, line 110, in ? main() File ./lib/python2.4/site-packages/RelStorage-1.1.3-py2.4.egg/relstorage/zodbconvert.py, line 68, in main schema = ZConfig.loadSchemaFile(StringIO(schema_xml)) File /home/xlhost/zope/lib/python2.4/site-packages/ZConfig-2.6.1-py2.4.egg/ZConfig/loader.py, line 35, in loadSchemaFile return SchemaLoader().loadFile(file, url) File /home/xlhost/zope/lib/python2.4/site-packages/ZConfig-2.6.1-py2.4.egg/ZConfig/loader.py, line 75, in loadFile return self.loadResource(r) File /home/xlhost/zope/lib/python2.4/site-packages/ZConfig-2.6.1-py2.4.egg/ZConfig/loader.py, line 187, in loadResource schema = ZConfig.schema.parseResource(resource, self) File /home/xlhost/zope/lib/python2.4/site-packages/ZConfig-2.6.1-py2.4.egg/ZConfig/schema.py, line 27, in parseResource xml.sax.parse(resource.file, parser) File /home/xlhost/zope/lib/python2.4/site-packages/RelStorage-1.1.3-py2.4.egg/relstorage/__init__.py, line 31, in parse File /usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py, line 109, in parse File /usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py, line 123, in parse File /usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py, line 216, in feed File /usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py, line 312, in start_element File /home/xlhost/zope/lib/python2.4/site-packages/ZConfig-2.6.1-py2.4.egg/ZConfig/schema.py, line 103, in startElement getattr(self, start_ + name)(attrs) File /home/xlhost/zope/lib/python2.4/site-packages/ZConfig-2.6.1-py2.4.egg/ZConfig/schema.py, line 306, in start_import src = self._loader.schemaComponentSource(pkg, file) File /home/xlhost/zope/lib/python2.4/site-packages/ZConfig-2.6.1-py2.4.egg/ZConfig/loader.py, line 215, in schemaComponentSource filename=file, package=package) ZConfig.SchemaResourceError: import name does not refer to a package Package name: 'relstorage' File name: 'component.xml' Package path: None a debug print before the exception is raised revealed the following: - a __import__('relstorage') on line 204 of ZConfig/loader.py loads the module just fine. - the test hasattr(pkg, __path__) on line 211 fails. - a __import__('relstorage') in my virtualenv's python interpreter imports the module and there it has a __path__ attribute! in a newsgroup posting i read the following sentence: modules don't have __path__, only packages do. wtf??? his is as much information as i can provide. i'm somehow lost and confused now. any hints? thanks in advance and best regards! jürgen -- 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
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 )