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

Bahman Movaqar Bahman at BahmanM.com
Sat May 25 21:10:21 UTC 2013


Found this 
(http://old.nabble.com/megrok.rdb-setup-error-td33944436.html) which 
solves the problem.

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

On 05/26/2013 01:22 AM, Bahman Movaqar wrote:
> 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?
>



More information about the Grok-dev mailing list