[Zope] InvalidObjectReference strikes

Jurgen Defurne jurgen.defurne at pandora.be
Sat Aug 21 02:32:01 EDT 2004


Hello,

Since a month or three, I am writing a transactional application using Zope
and postgreSQL. My progress is not very high, because of learning Zope and its
idiosyncracies, and because of our little daughter, born two months ago.
However, I could see advancement in it.

I am writing this as an MVC application, using events to find out which script
to run, and a table driven screen flow manager to decide what should be the
next screen.

I very much like TAL, because it makes it possible for me to generate some
default screens based upon the database table descriptions.

In my application, I first need to build up my resulting data before I
instantiate a screen from a template. Since I am only now beginning to add
real functionality to my system (as previously making sure that my basic
structure was allright), I only got now to the following problem.

I need some 'batch' programming, for which I use a ZSQL object. I can query
the object fine, but I cannot assign any part of the result into my session.
Even if I try to copy separate fields from the result into another array, I
always get the

Error Type: InvalidObjectReference
Error Value: Attempt to store an object from a foreign database connection

error.

Does anyone have a clue how I can copy the contents of the query result into a
Python array or dictionary in Zope ?

Regards,

Jurgen


More information about the Zope mailing list