TG2 / Elixir Transaction Issue

14 views
Skip to first unread message

erisian

unread,
Mar 2, 2011, 7:48:21 PM3/2/11
to TurboGears
I used to be a serious user of Elixir / SQLAlchemy a few years ago and
really liked it. So when I needed to deploy a light application for
our workgroup I naturally turned to TG. TG2 looked to be the most
flexible so I went with that. I installed it on Linux, walked through
the quick start installed web site and started hacking on the default
web app.

So far everything has been straight forward. I'm learning TG2 by the
seat of my pants etc.

I've run into a problem though. My object model was created in
Elixir and it worked fine under interactive testing in IPython etc.
There was a little bit of an impedance mismatch because I had to
retrofit my Elixir code into the TG2 demo app, but I found most of the
code I needed in various examples. I converted the repoze User/Group/
Perm model into Elixir and integrated it with the rest of my model. I
can login, look at restricted pages etc. I was very pleased to see
that the "admin" page introspected my object model and was offering to
let me perform CRUD ops.

Here's my issue:

In admin I examined my User/Group/Perm objects. It properly displayed
my users and groups so I thought I'd try editing a user.

1. I was able to bring a user up in the editing form.
2. I modified the display name and hit 'submit' and received:

ResourceClosedError: The transaction is closed

I tried hunting this error down, but I think it might take a while
considering that I'm new to the framework. Has anyone seen anything
like this or know of a likely place to fix it?

I did notice that some of the older Elixir demo code that I tried also
used a transaction option when creating the session, but it was a
different transaction subsystem. The new transaction manager seems to
have come from Zope and it might be possible that it's interface isn't
totally transparent to Elixir.

Anyway, I'll keep looking for the solution but if anyone knows a
solution to this I'd really appreciate it.

Thanks,

erisian

Maxim Oganesyan

unread,
Mar 3, 2011, 4:16:56 AM3/3/11
to turbo...@googlegroups.com
Erisian, do You use commiting/rolling back/etc. of transactions?

Maxim.

erisian

unread,
Mar 3, 2011, 11:43:17 AM3/3/11
to TurboGears
Maxim,

I don't, but apparently the AdminController does. This means I have
to open my session using the Zope Transaction option (or soemthing
compatible that's not breaking). I guess this means that I have to
figure out how AdminController uses the Zope transaction layer and why
it's not working.


erisian

D R Dinesh Kumar

unread,
May 11, 2017, 1:56:24 PM5/11/17
to TurboGears
Hi Erisian,

have you found the solution for this? I got stuck with the same issue. Please help.

With Regards,
Dinesh.
Reply all
Reply to author
Forward
0 new messages