[Grok-dev] megrok.rdb setup error
Jeffrey Peterson
bgpete at gmail.com
Thu May 10 18:05:26 UTC 2012
You need to pin some libraries…
'megrok.rdb>=0.12',
'SQLAlchemy<=0.7',
'z3c.saconfig>=0.12',
'psycopg2>=2.4.2',
that setup works for me.
Jeffrey Peterson
bgpete3 at gmail.com
On May 10, 2012, at 11:26 AM, Mauro Boschi wrote:
> Hi to all,
> I'm new with Grok!
>
> As in http://grok.zope.org/documentation/how-to/orm-using-megrok.rdb-and-sqlalchemy
>
> I have added megrok.rdb to setup.py
>
> install_requires=['setuptools',
> ...
> # Add extra requirements here
> 'megrok.rdb'
> ],
>
> than run bin/buildout
>
> restarting Grok I see this error:
>
> # bin/paster serve --reload parts/etc/deploy.ini
> Starting subprocess with file monitor
> Traceback (most recent call last):
> File "bin/paster", line 20, in <module>
> paste.script.command.run()
> File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run
> invoke(command, command_name, options, args[1:])
> File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke
> exit_code = runner.run(args)
> File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run
> result = self.command()
> File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 284, in command
> relative_to=base, global_conf=vars)
> File "/home/usytis/.buildout/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/serve.py", line 321, in loadapp
> **kw)
> File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 203, in loadapp
> return loadobj(APP, uri, name=name, **kw)
> File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 224, in loadobj
> return context.create()
> File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 617, in create
> return self.object_type.invoke(self)
> File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 163, in invoke
> app = context.app_context.create()
> File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 617, in create
> return self.object_type.invoke(self)
> File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/loadwsgi.py", line 109, in invoke
> return fix_call(context.object, context.global_conf, **context.local_conf)
> File "/home/usytis/.buildout/eggs/PasteDeploy-1.3.4-py2.7.egg/paste/deploy/util/fixtypeerror.py", line 57, in fix_call
> val = callable(*args, **kw)
> File "/home/usytis/.buildout/eggs/grokcore.startup-1.2-py2.7.egg/grokcore/startup/startup.py", line 14, in application_factory
> return zope.app.wsgi.getWSGIApplication(zope_conf)
> File "/home/usytis/.buildout/eggs/zope.app.wsgi-3.13.0-py2.7.egg/zope/app/wsgi/__init__.py", line 162, in getWSGIApplication
> db = config(configfile, schemafile, features)
> File "/home/usytis/.buildout/eggs/zope.app.wsgi-3.13.0-py2.7.egg/zope/app/wsgi/__init__.py", line 150, in config
> appsetup.config(options.site_definition, features=features)
> File "/home/usytis/.buildout/eggs/zope.app.appsetup-3.15.0-py2.7.egg/zope/app/appsetup/appsetup.py", line 111, in config
> context = xmlconfig.file(file, context=context, execute=execute)
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 649, in file
> include(context, name, package)
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
> processxmlfile(f, context)
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
> parser.parse(src)
> File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
> xmlreader.IncrementalParser.parse(self, source)
> File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
> self.feed(buffer)
> File "/usr/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
> self._parser.Parse(data, isFinal)
> File "/usr/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
> self._cont_handler.endElementNS(pair, None)
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
> self.context.end()
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
> self.stack.pop().finish()
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
> actions = self.handler(context, **args)
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 548, in include
> processxmlfile(f, context)
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 380, in processxmlfile
> parser.parse(src)
> File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
> xmlreader.IncrementalParser.parse(self, source)
> File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
> self.feed(buffer)
> File "/usr/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
> self._parser.Parse(data, isFinal)
> File "/usr/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
> self._cont_handler.endElementNS(pair, None)
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 359, in endElementNS
> self.context.end()
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 558, in end
> self.stack.pop().finish()
> File "/home/usytis/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 706, in finish
> actions = self.handler(context, **args)
> File "/home/usytis/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclude/zcml.py", line 51, in includeDependenciesDirective
> info = DependencyFinder(dist).includableInfo(['configure.zcml', 'meta.zcml'])
> File "/home/usytis/.buildout/eggs/z3c.autoinclude-0.3.3-py2.7.egg/z3c/autoinclude/dependency.py", line 24, in includableInfo
> module = resolve(dotted_name)
> File "/home/usytis/.buildout/eggs/zope.dottedname-3.4.6-py2.7.egg/zope/dottedname/resolve.py", line 38, in resolve
> __import__(used)
> File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/__init__.py", line 1, in <module>
> from megrok.rdb.components import Model, Container, QueryContainer
> File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", line 46, in <module>
> class Container(MappedCollection):
> File "/home/usytis/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", line 62, in Container
> @collection.on_link
> zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/usytis/second/parts/etc/site.zcml", line 4.2-4.30
> ZopeXMLConfigurationError: File "/home/usytis/second/src/second/configure.zcml", line 4.2-4.37
> AttributeError: type object 'collection' has no attribute 'on_link'
>
> If I try with sqlalchemy it works!
>
> Thanks a lot!_______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
More information about the Grok-dev
mailing list