upgrading to Elixir 0.4.0 (TG 1.0.3.2/SA 0.3.10)

1 view
Skip to first unread message

remi jolin

unread,
Nov 7, 2007, 12:47:40 PM11/7/07
to sqle...@googlegroups.com
Hello,

I've just upgraded a system from:
- TG 1.0.3.2
- SA 0.3.10
- Elixir 0.3 (plus a few patchs...)
to Elixir 0.4 (trunk)
and I get some problems when starting my TG application or trying to get
datas when running tg-admin shell.
The error message is always around not locating any engine or connection...
"This SchemaItem is not connected to any Engine or Connection." or
"Could not locate any Engine or Connection bound to mapper
'Mapper|User|tg_user'"

I've read the information in
http://elixir.ematia.de/trac/wiki/Migrate03to04 and browsed the elixir
list but could not find any clear information.
Is it supposed to work or should I also upgrade to TG 1.0.4 ?

Gaetan de Menten

unread,
Nov 7, 2007, 12:58:21 PM11/7/07
to sqle...@googlegroups.com

I don't know the specifics about the differences between TG 1.0.3.2
and TG 1.0.4 but I don't *think* there is any reason it wouldn't work
if that worked for you before.

My guess is that you are hitting the __metadata__ vs metadata problem.

http://elixir.ematia.de/trac/wiki/Migrate03to04#Module-levelmetadataandsessionattributes

--
Gaëtan de Menten
http://openhex.org

remi jolin

unread,
Nov 7, 2007, 1:07:22 PM11/7/07
to sqle...@googlegroups.com
Yes, you must be right.
I've just added the following lines just after the "from
turbogears.database import metadata, session" line in my model.py and it
seems to work :
import elixir
elixir.metadata, elixir.session = metadata, session

I found these lines in the template that TG 1.0.4 uses when doing a
"tg-admin quickstart".

Gaetan de Menten

unread,
Nov 7, 2007, 1:19:17 PM11/7/07
to sqle...@googlegroups.com

Another, more explicit (and IMO cleaner) way would be this:

from turbogears.database import metadata
__metadata__ = metadata

or even

from turbogears.database import metadata as __metadata__

>
> I found these lines in the template that TG 1.0.4 uses when doing a
> "tg-admin quickstart".
>

--

remi jolin

unread,
Nov 8, 2007, 3:15:21 AM11/8/07
to sqle...@googlegroups.com
le 07.11.2007 19:19 Gaetan de Menten a écrit:
> On 11/7/07, remi jolin <remi....@sysgroup.fr> wrote:
>
>> le 07.11.2007 18:58 Gaetan de Menten a écrit:
>>
>>> I don't know the specifics about the differences between TG 1.0.3.2
>>> and TG 1.0.4 but I don't *think* there is any reason it wouldn't work
>>> if that worked for you before.
>>>
>>> My guess is that you are hitting the __metadata__ vs metadata problem.
>>>
>>> http://elixir.ematia.de/trac/wiki/Migrate03to04#Module-levelmetadataandsessionattributes
>>>
>> Yes, you must be right.
>> I've just added the following lines just after the "from
>> turbogears.database import metadata, session" line in my model.py and it
>> seems to work :
>> import elixir
>> elixir.metadata, elixir.session = metadata, session
>>
>
> Another, more explicit (and IMO cleaner) way would be this:
>
> from turbogears.database import metadata
> __metadata__ = metadata
>
> or even
>
> from turbogears.database import metadata as __metadata__
>
>
and
from turbogears.database import session as __session__

or you'll get errors "object '<xxxx object 0x12345678>' is already
attached to session '22222222' (this is '33333333')"

Gaetan de Menten

unread,
Nov 8, 2007, 3:24:57 AM11/8/07
to sqle...@googlegroups.com

Thanks for the clarification. Since I have never really developed for
TurboGears, I wasn't sure if that was necessary too.

Reply all
Reply to author
Forward
0 new messages