[Grok-dev] Can't import 'megrok.rdb'

Bahman Movaqar Bahman at BahmanM.com
Sat May 25 20:52:40 UTC 2013


Hi all,

Following this tutorial 
(http://grok.zope.org/documentation/how-to/orm-using-megrok.rdb-and-sqlalchemy), 
after adding `megrok.rdb' to `setup.py' and running buildout I can't do 
`from megrok import rdb'.

$ bin/python-console
 >>> import grok
 >>> from megrok import rdb
Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File 
"/home/bahman/.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/bahman/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", 
line 46, in <module>
     class Container(MappedCollection):
   File 
"/home/bahman/.buildout/eggs/megrok.rdb-0.12-py2.7.egg/megrok/rdb/components.py", 
line 62, in Container
     @collection.on_link
AttributeError: type object 'collection' has no attribute 'on_link'

I found this 
(https://mail.zope.org/pipermail/grok-dev/2012-May/011669.html) and 
tried it to no avail.

What am I doing wrong?  Is this approach applicable at all or the 
tutorial is just outdated?

-- 
Bahman Movaqar  (http://BahmanM.com)
ERP Evaluation, Implementation, Deployment Consultant



More information about the Grok-dev mailing list