Try this:

import myapp.model



On 5 Aug, 18:26, Maxim Sloyko <[EMAIL PROTECTED]> wrote:
> Hello!
> I just tried TurboGears today for the first time, and there is the
> problem I've encountered:
> whenever I try to "import model" in my controllers.py I get this error
>
> File "start-myapp.py", line 23, in ?
>     from myapp.controllers import Root
>   File "controllers.py", line 7, in ?
>     import model as m
>   File "model.py", line 11, in ?
>     visits_table = simple_table('visit')
>   File "model.py", line 8, in simple_table
>     return sa.Table(t_name, metadata, autoload = True)
>   File "/usr/lib/python2.4/site-packages/sqlalchemy/schema.py", line
> 175, in __call__
>     metadata._get_engine(raiseerr=True).reflecttable(table)
>   File "/usr/lib/python2.4/site-packages/sqlalchemy/schema.py", line
> 1325, in _get_engine
>     raise exceptions.InvalidRequestError("This SchemaItem is not
> connected to any Engine or Connection.")
> sqlalchemy.exceptions.InvalidRequestError: This SchemaItem is not
> connected to any Engine or Connection.
>
> If I don't import the model -- everything is fine, but programming
> without model is not that much of a fun :)
>
> Has anyone seen this error? If you need some code to look at -- please
> say which parts to post, because I have no idea how to track this
> error down...
>
> Any help will be appreciated.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to