I think that this: http://www.zope.org/Documentation/Reference/ObjectPublishingIntro is out of date, right? BoboPOS no longer has "PickleDictionary". It would be great if this document could be updated with a message: "this info is a little out of date. Please see blah." Zope really doesn't like what I came up with through hacking around: def doit( state="Texas", city="Dallas"): connection = Globals.DB.open() states=[] connection.root()["abc"]="def" return "foo" Paul Prescod
I'd really like to use ZODB3 with Python but can't get anywhere with it because of lack of documentation....the old stuff is not correct and I am not aware of new docs/examples. Also, I'd like to install ZODB3 with a standard python 1.5.2 install and have the configuration (path) settings to make it work [windows platform]. regards, Steve -----Original Message----- From: zope-dev-admin@zope.org [SMTP:zope-dev-admin@zope.org] On Behalf Of Paul Prescod Sent: Tuesday, August 24, 1999 11:53 PM To: zope-dev@zope.org Subject: [Zope-dev] Persistence I think that this: http://www.zope.org/Documentation/Reference/ObjectPublishingIntro is out of date, right? BoboPOS no longer has "PickleDictionary". It would be great if this document could be updated with a message: "this info is a little out of date. Please see blah." Zope really doesn't like what I came up with through hacking around: def doit( state="Texas", city="Dallas"): connection = Globals.DB.open() states=[] connection.root()["abc"]="def" return "foo" Paul Prescod _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev (To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce For non-developer, user-level issues, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
Paul Prescod wrote:
I think that this:
http://www.zope.org/Documentation/Reference/ObjectPublishingIntro
is out of date, right? BoboPOS no longer has "PickleDictionary". It would be great if this document could be updated with a message: "this info is a little out of date. Please see blah."
Good idea.
Zope really doesn't like what I came up with through hacking around:
def doit( state="Texas", city="Dallas"): connection = Globals.DB.open() states=[]
connection.root()["abc"]="def"
return "foo"
How did you execue this? What error did you get? BTW, you should close the connection when your done with it. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Jim Fulton wrote:
How did you execue this? What error did you get?
Ironically, I got it to work fine As Long As I didn't close the connection. External method: import Globals def doit( state="Texas", city="Dallas"): connection = Globals.DB.open() connection.root()["myobj"]="abc" # causes crash: connection.close() return "blah" If I don't comment out that line: Traceback (innermost last): File C:\temp\mywebsite\lib\python\ZPublisher\Publish.py, line 209, in publish_module File C:\temp\mywebsite\lib\python\ZPublisher\Publish.py, line 179, in publish File C:\temp\mywebsite\lib\python\Zope\__init__.py, line 199, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File C:\temp\mywebsite\lib\python\ZPublisher\Publish.py, line 169, in publish File C:\temp\mywebsite\lib\python\ZODB\Transaction.py, line 236, in commit File C:\temp\mywebsite\lib\python\ZODB\Connection.py, line 459, in tpc_begin Error Type: AttributeError Error Value: 'None' object has no attribute 'tpc_begin' ---- I also had an unrelated problem that I can't reporduce: Zope was trying to unpickle an instance of a class that I had defiend in the external method and then deleted. I tried to define it again but it didn't work. Maybe the problem is not that I deleted it but rather that I defined the class in an extension. Extensions aren't imported in the "standard way". They are "exec"ed on demand, right? The error message (on Zope startup) was: SystemError: Failed to import class PersistString from module __main__ I figured out how to work around this while I was writing this message. I defined the classes in __main__ Maybe Zope should disallow you from persisting classes defined in __main__ if that's a problem. That would help others avoid my problem. Paul Prescod
On Fri, 27 Aug 1999, Paul Prescod wrote:
SystemError: Failed to import class PersistString from module __main__
I figured out how to work around this while I was writing this message. I defined the classes in __main__
Maybe Zope should disallow you from persisting classes defined in __main__ if that's a problem. That would help others avoid my problem.
Paul Prescod
Long time ago I had the same problem and Jim suggested to disable such functionality all together. I think it would be a good idea ... pavlos
Jim Fulton wrote:
Paul Prescod wrote:
I think that this:
http://www.zope.org/Documentation/Reference/ObjectPublishingIntro
is out of date, right? BoboPOS no longer has "PickleDictionary". It would be great if this document could be updated with a message: "this info is a little out of date. Please see blah."
Good idea.
I would suggest that all downloadable doc files be listed with mod-time (and perhaps zope version)... if only to allow users to see when there has been a change in the docs. BB
participants (5)
-
Boris Borcic -
Jim Fulton -
Paul Prescod -
Pavlos Christoforou -
steve@hosys.com