Re: [Zope-dev] Re: [Bug] ZODB invalidation processing
Joachim Schmitz schrieb: I could reproduce the conflict error on my local machine not using ZEO. I invoked the longrunning process create_level for two users after a zope-restart. here is the log: 2007-05-31 09:44:24 INFO Zope Ready to handle requests 2007-05-31 09:44:39 INFO Skins.create_level A923157 started to create level 200 2007-05-31 09:44:41 INFO Skins.create_level Y617041 started to create level 400 the next two entries are printed before the redirect/commit 2007-05-31 09:45:01 INFO Skins.create_level Y617041 finished to create level 400 2007-05-31 09:45:06 INFO Skins.create_level A923157 finished to create level 200 Now the conflict error, look at the transaction start-time, this is before the restart of zope !! 2007-05-31 09:45:25 INFO ZPublisher.Conflict ConflictError at /uniben/campus/students/A923157/study_course/create_level: database conflict error (oid 0x3360e3, class BTrees._OIBTree.OIBucket, serial this txn started with 0x036dfd7c73dfc1dd 2007-05-31 07:24:27.157981, serial currently committed 0x036dfd9131112455 2007-05-31 07:45:11.500069) (1 conflicts (0 unresolved) since startup at Thu May 31 09:44:24 2007) now this is retried for A923157 2007-05-31 09:45:26 INFO Skins.create_level A923157 started to create level 200 2007-05-31 09:45:45 INFO Skins.create_level A923157 finished to create level 200 I deleted the created objects and repeated the test: 2007-05-31 12:46:12 ERROR Zope.ZCatalog uncatalogObject unsuccessfully attempted to uncatalog an object with a uid of /uniben/campus/students/A923157/study_course/200/ZOO213. 2007-05-31 12:47:05 INFO Skins.create_level Y617041 started to create level 400 2007-05-31 12:47:14 INFO Skins.create_level A923157 started to create level 200 2007-05-31 12:47:25 INFO Skins.create_level Y617041 finished to create level 400 2007-05-31 12:47:40 INFO Skins.create_level A923157 finished to create level 200 2007-05-31 12:47:58 INFO ZPublisher.Conflict ConflictError at /uniben/campus/students/A923157/study_course/create_level: database conflict error (oid 0x3647b0, class BTrees._IOBTree.IOBucket, serial this txn started with 0x036dfe463486d955 2007-05-31 10:46:12.310958, serial currently committed 0x036dfe479a5725cc 2007-05-31 10:47:36.173536) (3 conflicts (0 unresolved) since startup at Thu May 31 09:44:24 2007) again the txn starttime is that of an older transaction, and it is the time of the uncatalog entry. If I invoke the create_level only for one student, no conflict-error occurs. -- Gruß Joachim ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: [Bug] ZODB invalidation processing
I deleted the created objects and repeated the test: 2007-05-31 12:46:12 ERROR Zope.ZCatalog uncatalogObject unsuccessfully attempted to uncatalog an object with a uid of /uniben/campus/students/A923157/study_course/200/ZOO213. 2007-05-31 12:47:05 INFO Skins.create_level Y617041 started to create level 400 2007-05-31 12:47:14 INFO Skins.create_level A923157 started to create level 200 2007-05-31 12:47:25 INFO Skins.create_level Y617041 finished to create level 400 2007-05-31 12:47:40 INFO Skins.create_level A923157 finished to create level 200 2007-05-31 12:47:58 INFO ZPublisher.Conflict ConflictError at /uniben/campus/students/A923157/study_course/create_level: database conflict error (oid 0x3647b0, class BTrees._IOBTree.IOBucket, serial this txn started with 0x036dfe463486d955 2007-05-31 10:46:12.310958, serial currently committed 0x036dfe479a5725cc 2007-05-31 10:47:36.173536) (3 conflicts (0 unresolved) since startup at Thu May 31 09:44:24 2007) again the txn starttime is that of an older transaction, and it is the time of the uncatalog entry. If I invoke the create_level only for one student, no conflict-error occurs. I've checked my logs for conflict errors with session machinery. I also had times earlier than zope startup: http://mail.zope.org/pipermail/zope-dev/2007-April/029244.html I don't know why... Maybe your problem is simply that 'create_level' does something with Catalog (as Tres Seaver suggested). If so, then if one transaction changes it then second transaction raises conflict. With sessions I had problems with OOBTree not IOBTree. -- Maciej Wisniowski ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope Tests: 5 OK
Summary of messages to the zope-tests list. Period Wed May 30 12:00:00 2007 UTC to Thu May 31 12:00:00 2007 UTC. There were 5 messages: 5 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Wed May 30 20:52:11 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-May/007809.html Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Unit Tests Date: Wed May 30 20:53:42 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-May/007810.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Unit Tests Date: Wed May 30 20:55:13 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-May/007811.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Unit Tests Date: Wed May 30 20:56:46 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-May/007812.html Subject: OK : Zope-trunk Python-2.4.4 : Linux From: Zope Unit Tests Date: Wed May 30 20:58:17 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-May/007813.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [ZODB-Dev] Re: [Bug] ZODB invalidation processing
Joachim Schmitz wrote at 2007-5-31 12:07 +0200: ... 2007-05-31 09:45:06 INFO Skins.create_level A923157 finished to create level 200 Now the conflict error, look at the transaction start-time, this is before the restart of zope !! You are probably tricked out here: the serials are in fact UTC timestamps. I am not sure but it may well be that the times shown for the serials are UTC (GMT +0) and not local times. -- Dieter ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: [ZODB-Dev] Re: [Bug] ZODB invalidation processing
Dieter Maurer schrieb: Joachim Schmitz wrote at 2007-5-31 12:07 +0200: ... 2007-05-31 09:45:06 INFO Skins.create_level A923157 finished to create level 200 Now the conflict error, look at the transaction start-time, this is before the restart of zope !! You are probably tricked out here: the serials are in fact UTC timestamps. I am not sure but it may well be that the times shown for the serials are UTC (GMT +0) and not local times. I added 2 hours to the txn times and only looked at minutes. so the observation is still true. -- Gruß Joachim ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: [Bug] ZODB invalidation processing
Hi, I was able to locate the places in the Zope-sources where the conflict error is triggered. On my local system it's in ZODB.FileStorage in the store-method there is if serial != cached_tid: rdata = self.tryToResolveConflict(oid, cached_tid,serial, data) in the tryToResolveConflict method of ZODB.ConnflictResolution there is: committed = state(self, oid, committedSerial, prfactory, committedData) print resolve, resolve resolved = resolve(old, committed, newstate) I found that the resolve-function raises an ConflictError exception, so I put an print there to find out which resolve function. Here is the output: resolve bound method Length._p_resolveConflict of BTrees.Length.Length object at 0xb28fff6c resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb1b81224 resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb1b81224 resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb260c80c resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb260c614 resolve bound method Length._p_resolveConflict of BTrees.Length.Length object at 0xb2a9146c resolve built-in method _p_resolveConflict of BTrees._IOBTree.IOBucket object at 0xb1b81224 The last resolve raises an exeption (Pdb) p sys.exc_info() (class ZODB.POSException.BTreesConflictError at 0xb78df0bc, BTreesConflictError(-1, 47, 47, 6), traceback object at 0xb1c34dec) How can I invest this further, especially how can I get information about the actual object,which is causing the conflict. -- Gruß Joachim ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: [Bug] ZODB invalidation processing
resolve bound method Length._p_resolveConflict of BTrees.Length.Length object at 0xb28fff6c resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb1b81224 resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb1b81224 resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb260c80c resolve built-in method _p_resolveConflict of BTrees._OIBTree.OIBucket object at 0xb260c614 resolve bound method Length._p_resolveConflict of BTrees.Length.Length object at 0xb2a9146c resolve built-in method _p_resolveConflict of BTrees._IOBTree.IOBucket object at 0xb1b81224 The last resolve raises an exeption (Pdb) p sys.exc_info() (class ZODB.POSException.BTreesConflictError at 0xb78df0bc, BTreesConflictError(-1, 47, 47, 6), traceback object at 0xb1c34dec) Length, IOBucket and such things seems to me to be related to session machinery. What timeout and resolution times you have now? Also try if there are differences when you try to call your methods just after zope restart and after few different calls to get session objects created. How can I invest this further, especially how can I get information about the actual object,which is causing the conflict. http://www.zopelabs.com/cookbook/1054240694 Maybe this will help. Take a look at comments on this page. -- Maciej Wisniowski ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] Re: MemoryError exception when importing a zexp file
(Wed, May 30, 2007 at 10:31:31AM +0100) Ben Lobo wrote/schrieb/egrapse: Thanks for the tip. I tried increasing the swap file to 10GB but still got the same memory error. Some operating systems limit the amount of RAM a single process can consume. Sometimes that amount can be adjusted. Also 32bit systems can only use a limited amount of RAM per process due to the limit of what you can address with 32bits -- over that amount you can give the system 100GB or 1000GB of swap, it won't change a thing. Even if those do not apply, I guess it's very much possible for a process to eat up all the RAM, no matter how much that is, all it would need is a little bit of recursion. I'm now considering exporting the Plone site (cos that's what it is) one piece at a time and reimporting it into a clean Plone site. Any thoughts on whether or not this is a good idea? Not mentioning Plone in the first place is problematic. In fact *plone* is problematic. Did you verify with plohn people (e.g. on a Plone mailing list) that current plone versions can be imported/exported? (Because the last time I made the mistake to do a project with plone you couldn't import/export a plone site -- or rename it, move it to another instance or anything similar for that matter -- without major pain. It's been a while though, so things could have changed.) Summary: Go and ask the plone people, if you can't import anyway, the whole exercise is in vain. Good luck! Regards, Sascha ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Function reindexObject()
Thanks ;) but it's no really what I want sorry I work like that : __ |ZMI(zope 2.7)| | | |Product : Document, my_product...| Export script | |-- A file with all data |_|of product (text) | | | Import script | |ZMI(zope2.9) |--- |Product : Document,.. | (reindexObject) | | |__| So, the export script copy all data of a product in a text file (whit accessor : getID,etTitle, getText...). Each line of this file is the datas of a product, next lines are other products. The import script run very well, I transform each line of the text file to a correspondant product as zope2.7. But I want put each new product in the same repertory as zope 2.7. So how say to each product in my import script where it must be copy. This import script: - id = self.generateUniqueId('J_product') self.invokeFactory('J_product', id) mct = getattr(self, id) mct.setTitle(row[1]) mct.setJ_product_descriptif(row[2]) mct.setJ_product_web(row[3]) ## add images ## im = recup_image(mesimages,compteur,) if im != 'no_image': mct.setJ_product_image(im) self.portal_workflow.doActionFor(mct,publish, comment=) self.reindexObject() My subject is reindexObject because I think it's this function that put the new Object (product) in ZMI. I don't know :s Maybe I should make a line like that : mct.setDirectory(/SITES/plone_mySite/repertory1/) repertory1 is where I want put the object (I have in my text file generated with export script, the url of each product). So, It's nothing if nobody understand ;) but I would like. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Function reindexObject()
Maybe I can cut and paste each product(object) from /SITES/Plone_site/ to /SITES/Plone_site/goodDirectory But I don't find how cut and paste an object in zope with a python script. Could you help me :) Tahnks Julian ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Function reindexObject()
The import script run very well, I transform each line of the text file to a correspondant product as zope2.7. But I want put each new product in the same repertory as zope 2.7. So how say to each product in my import script where it must be copy. Why don't you just export object path along with it's data? use |getPhysicalPath() for example. Take a look at http://plope.com/Books/2_7Edition/AppendixB.stx#2-396 for description. Also consider use of restrictedTraverse to get access to object that you will add newly created objects to (during import). Sth like: container = self.|restrictedTraverse('/SITES/plone_mySite/repertory1/) container.invokeFactory Or something like that. My subject is reindexObject because I think it's this function that put the new Object (product) in ZMI. I don't know :s AFAIK reindexObject is used to reindex object in Catalog. invokeFactory puts new object of the specific type to ZMI. -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Re: MemoryError exception when importing a zexp file
I'm now considering exporting the Plone site (cos that's what it is) one piece at a time and reimporting it into a clean Plone site. Any thoughts on whether or not this is a good idea? Not mentioning Plone in the first place is problematic. In fact *plone* is problematic. Did you verify with plohn people (e.g. on a Plone mailing list) that current plone versions can be imported/exported? (Because the last time I made the mistake to do a project with plone you couldn't import/export a plone site -- or rename it, move it to another instance or anything similar for that matter -- without major pain. It's been a while though, so things could have changed.) Summary: Go and ask the plone people, if you can't import anyway, the whole exercise is in vain. I've happily moved, renamed, exported and imported Plone sites, both within a single zope instance and between separate instances on many occasions so I don't think Plone is the problem. The only difference in this case is the size of the Plone site and the amount of RAM it seems to want to use. I'm not much of an expert on diagnosing and managing memory problems so I'm not sure how to check things like where the import failed other than by looking at Windows task manager (it's Windows 2003 server). If there are any OS limitations on memory usage, it's only what would normally be set up on a standard Windows installation. Someone in this thread asked why I'm doing this export in the first place: I want to import it back into zope but into a separate storage file so that I can back it up separately from the main storage. Someone suggested that I might be able to do it by copying the entire Data.fs file to the new strage location, restarting zope and then deleting the bits that I don't want instead of exporting then importing. I tried this but it didn't work unfortunately. The new mount point just appeared in the zmi root with a broken icon and gave me an 'unsubscriptable object type error when I tried to access it. Any further tips would be gratefully welcomed. Cheers Ben ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Re: MemoryError exception when importing a zexp file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 31 May 2007, at 13:56, Ben Lobo wrote: Someone in this thread asked why I'm doing this export in the first place: I want to import it back into zope but into a separate storage file so that I can back it up separately from the main storage. Someone suggested that I might be able to do it by copying the entire Data.fs file to the new strage location, restarting zope and then deleting the bits that I don't want instead of exporting then importing. I tried this but it didn't work unfortunately. The new mount point just appeared in the zmi root with a broken icon and gave me an 'unsubscriptable object type error when I tried to access it. Good that I asked. That's not a valid reason to do import/export. As the other person mentioned, you should copy the database and do it that way. If you run into problems that way you need to post useful error messages (meaning, something better than didn't work) and paste the full error traceback and all symptoms. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGXs4JRAx5nvEhZLIRAloCAJ92O4GoSGMDeMek0qKk/vEkdwkwawCdFle+ n+jnt5XauqI/JxsyG52zxdg= =gZuZ -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Uncaptured python exception
I am using zope 2.9, python 3.4. when I have a bug in my python I get Uncaptured Python Exception coming from zope. This is a nightmare. I have spent hours trying to trace down the simplest typos that would have been instantly reported in any other development environment. How do I get zope to Capture these exceptions? I just want to know what line the error occurred in! Anything at all would be helpful! Do I need a different version of zope or python? Perhaps a python module? Jon ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
- Original Message - From: Jon Emmons [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, May 31, 2007 9:58 AM Subject: [Zope] Uncaptured python exception I am using zope 2.9, python 3.4. when I have a bug in my python I get Uncaptured Python Exception coming from zope. This is a nightmare. I have spent hours trying to trace down the simplest typos that would have been instantly reported in any other development environment. How do I get zope to Capture these exceptions? I just want to know what line the error occurred in! Anything at all would be helpful! Do I need a different version of zope or python? Perhaps a python module? Zope 2.9.x requires python 2.4.2 or 2.4.3 Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Oops, my bad. Python is 2.4.4. (not 3.4) perhaps my python needs to be moved back a bit. I don't get any error in the error log from the zope admin, just this cryptic msg from the window that zope is running in. 2007-05-31 09:48:49 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 206.246.160.45:20916 at -0x49709f74 channel#: 202 requests: (socket.error:(104, 'Connection reset by peer') [/usr/local/lib/python2.4/asynchat.py|initiate_send|219] [/home/zope/zope/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/local/lib/python2.4/asyncore.py|send|332]) -Original Message- From: Jonathan [mailto:[EMAIL PROTECTED] Sent: Thursday, May 31, 2007 10:07 AM To: Jon Emmons; zope@zope.org Subject: Re: [Zope] Uncaptured python exception - Original Message - From: Jon Emmons [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, May 31, 2007 9:58 AM Subject: [Zope] Uncaptured python exception I am using zope 2.9, python 3.4. when I have a bug in my python I get Uncaptured Python Exception coming from zope. This is a nightmare. I have spent hours trying to trace down the simplest typos that would have been instantly reported in any other development environment. How do I get zope to Capture these exceptions? I just want to know what line the error occurred in! Anything at all would be helpful! Do I need a different version of zope or python? Perhaps a python module? Zope 2.9.x requires python 2.4.2 or 2.4.3 Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
On 5/31/07, Jon Emmons [EMAIL PROTECTED] wrote: I don't get any error in the error log from the zope admin, just this cryptic msg from the window that zope is running in. 2007-05-31 09:48:49 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 206.246.160.45:20916 at -0x49709f74 channel#: 202 requests: (socket.error:(104, 'Connection reset by peer') [/usr/local/lib/python2.4/asynchat.py|initiate_send|219] [/home/zope/zope/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/local/lib/python2.4/asyncore.py|send|332]) This just means that the browser disconnected before the request was completely sent. In other words, the user used the Stop button. Nothing to worry about. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Thanks all for your help. I guess I was worried about nothing. Previous versions of zope did not generate those messages. I thought it was why I was getting no zope error at all with runtime errors. I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. Syntax errors I can find by simply importing the external method into the python interpreter. But dealing with the form variables, I will often have runtime errors that give no message at all. So I find myself putting little I am here print messaged throughout my code to try to zone in on where I mistyped the variable equipment_num as equipment_mun. Jon -Original Message- From: Andreas Jung [mailto:[EMAIL PROTECTED] Sent: Thursday, May 31, 2007 10:25 AM To: Jon Emmons; 'Jonathan'; zope@zope.org Subject: RE: [Zope] Uncaptured python exception --On 31. Mai 2007 10:12:35 -0400 Jon Emmons [EMAIL PROTECTED] wrote: Oops, my bad. Python is 2.4.4. (not 3.4) perhaps my python needs to be moved back a bit. I don't get any error in the error log from the zope admin, just this cryptic msg from the window that zope is running in. 2007-05-31 09:48:49 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 206.246.160.45:20916 at -0x49709f74 channel#: 202 requests: (socket.error:(104, 'Connection reset by peer') [/usr/local/lib/python2.4/asynchat.py|initiate_send|219] [/home/zope/zope/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/local/lib/python2.4/asyncore.py|send|332]) This indicates that the client closed the connection before completing the request. Not a Zope issue - it's in fact no issue. -aj ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: MemoryError exception when importing a zexp file
On Thu, May 31, 2007 at 09:55:26AM +0200, Sascha Welter wrote: ... Did you verify with plohn people (e.g. on a Plone mailing list) that current plone versions can be imported/exported? (Because the last time I made the mistake to do a project with plone you couldn't import/export a plone site -- or rename it, move it to another instance or anything similar for that matter -- without major pain. It's been a while though, so things could have changed.) I spent several hours recently to import a .zexp of a Plone 2.0 site. Got nowhere. One suggestion I got (which I wasn't able to follow) was the following. If you have access to the original server, try this: 1) Make a full backup of the entire ZODB, eg. using repozo.py. 2) Set up a new Zope instance with all the same products installed, using your new backup copy of the ZODB. 3) Go into the ZMI for this new instance, and delete everythign EXCEPT this plone site. 4) Pack the database to get rid of all the other stuff. Or make a new clean backup. There. You now have a Data.fs that contains only your Plone site. Instead of importing the .zexp, just mount the database at the appropriate path. Disclaimer: I haven't tried this yet. Summary: Go and ask the plone people, if you can't import anyway, the whole exercise is in vain. +1 -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
--On 31. Mai 2007 11:06:17 -0400 Jon Emmons [EMAIL PROTECTED] wrote: Thanks all for your help. I guess I was worried about nothing. Previous versions of zope did not generate those messages. Nonsense. Such error messages are shown by Zope since ages. I thought it was why I was getting no zope error at all with runtime errors. I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. What's the point? There is nothing to worry about. Your client closes the connection and Zope reacts with throwing an exception. There is nothing else Zope could do - either you catch the exception and swallow it or it won't catch the exception...so what's your *real* problem with the behavior? -aj pgpfbvdN0OjUG.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
- Original Message - From: Jon Emmons [EMAIL PROTECTED] To: 'Andreas Jung' [EMAIL PROTECTED]; 'Jonathan' [EMAIL PROTECTED]; zope@zope.org Sent: Thursday, May 31, 2007 11:06 AM Subject: RE: [Zope] Uncaptured python exception I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. Syntax errors I can find by simply importing the external method into the python interpreter. Syntax errors for external methods can also be found by clicking on the 'Save Changes' button of the external method object when in the ZMI. But dealing with the form variables, I will often have runtime errors that give no message at all. So I find myself putting little I am here print messaged throughout my code to try to zone in on where I mistyped the variable equipment_num as equipment_mun. Referring to non-existent python variables (eg. the mistyping you described above) should raise a KeyError. Do you have any try/except statements in your external method which may be capturing the errors? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Sometimes, I do get those errors. But if I take a working piece of python and stick in a sabotage statement like: Var1 = var2 Where var2 is undefined (i.e. has never been assigned anything) Just silent failure. No error. Jon -Original Message- From: Jonathan [mailto:[EMAIL PROTECTED] Sent: Thursday, May 31, 2007 11:15 AM To: Jon Emmons; zope@zope.org Subject: Re: [Zope] Uncaptured python exception - Original Message - From: Jon Emmons [EMAIL PROTECTED] To: 'Andreas Jung' [EMAIL PROTECTED]; 'Jonathan' [EMAIL PROTECTED]; zope@zope.org Sent: Thursday, May 31, 2007 11:06 AM Subject: RE: [Zope] Uncaptured python exception I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. Syntax errors I can find by simply importing the external method into the python interpreter. Syntax errors for external methods can also be found by clicking on the 'Save Changes' button of the external method object when in the ZMI. But dealing with the form variables, I will often have runtime errors that give no message at all. So I find myself putting little I am here print messaged throughout my code to try to zone in on where I mistyped the variable equipment_num as equipment_mun. Referring to non-existent python variables (eg. the mistyping you described above) should raise a KeyError. Do you have any try/except statements in your external method which may be capturing the errors? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Function reindexObject()
Very thanks !!! :) It's exactly the good method, thanks Julian ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
Var1 = var2 Where var2 is undefined (i.e. has never been assigned anything) Just silent failure. No error. So how do you know there is a failure then? There is really nothing in event.log and nothing in error_log? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] a batch of inSaNitY!
I just use Adobe Labs Spry Framework... this effectively puts the paging in javascript. On 5/31/07, Programmer [EMAIL PROTECTED] wrote: Hi Jonathan, I have something similar to your idea already. The python script supplies page number to a stored procedure which handles the actual paging. The script takes the result from the proc and builds an html table and handles column sorting on the table. The output of the script is just a single variable so I can just use dtml-var instead of the flaky dtml-in. Problem I have now is this new search interface makes use of full-text searching on SQL Server 2K. The paging proc wasn't written to handle it and will need to be rewritten from scratch. This will take a lot of time and testing. I thought I could slap something simple and fast together to use in the interim to allow people to start testing the search engine. I really do wish Zope would either fix or eliminate broken features. At the very least have the curtesy to say hey y'all, this is broke, don't bother so folks don't waste time with it. Mike -Original Message- From: Jonathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 5:22 PM To: Programmer; zope@zope.org Subject: Re: [Zope] a batch of inSaNitY! - Original Message - From: Programmer [EMAIL PROTECTED] To: zope@zope.org Sent: Wednesday, May 30, 2007 4:44 PM Subject: [Zope] a batch of inSaNitY! Hi I am about to go stark, raving, frothing mad with the DTML-IN batching. Is there a known (or unknown) bug with this? I have searched and read everything I can find about this and no luck. The problem is with carrying the query terms over from one batch page to the next. Right now I am using the script found here: http://mail.zope.org/pipermail/zope-collector-monitor/2003-May/002001.ht ml Except I changed, dtml-let batch=_.range(100, 180) batch_size=10 batch_start=REQUEST.get('batch_start',1) To dtml-let batch=myZSQLMethod1 batch_size=10 batch_start=REQUEST.get('batch_start',1) The mySQLMethod1 takes two params which the search form supplies to REQUEST. This works great. The pagination works beautifully. However, when I use the very same result script with myZSQLMethod2 (same DB table), which takes 5 params (all optional) the pagination breaks and no-longer passes the query terms. I have checked and rechecked both scripts and both forms. The ZSQLMethods both test good. I am out of ideas. For the life of me I cannot figure out why I'm losing my query terms in one and not the other when the two are almost identical. Care to enlighten me with your collective wisdom? In similar situations I have done the following: 1) call a python script/external method which: (i) does the db search; (ii) formats the results as required for display; (iii) returns a tuple that contains: list of search results, url parameters for 'previous' link; url parameters for 'next' link; url parameters for 'first link'; url parameters for 'last' link 2) use a dtml method to call the script/ext.method like dtml-let rStat=mySearchRoutine(parm1, parm1, ...) dtml-in rStat[0] display code here eg. dtml-var sequence-itembr or could be an html/css table, etc. dtml-if sequence-end a href=...?dtml-var rStat[1]previous/a a href=...?dtml-var rStat[2]next/a a href=...?dtml-var rStat[3]first/a a href=...?dtml-var rStat[4]last/a /dtml-if /dtml-in /dtml-let This greatly simplifies the dtml and facilitates debugging and future modifications. hth Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Thanks, Derek Wilson ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Uncaptured python exception
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jon Emmons wrote: Sometimes, I do get those errors. But if I take a working piece of python and stick in a sabotage statement like: Var1 = var2 Where var2 is undefined (i.e. has never been assigned anything) Just silent failure. No error. Sorry, but without a full recipe to reproduce this, I don't believe you; Zope raises exceptions just fine, and catches them itself only at the publisher layer, where they get rendered into a standard error message, as well as being dumped to the 'error_log' object. The effect you describe would only occur if some piece of application code (your script, or something that calls it) were swallowing the exception with a 'try: ... except: pass' (or similar). I would need to see the entire text of your script, plus whether this is a PythonScript, an ExternalMethod, or some bit of filesystem product code. I would also need to know what version of Zope and Python you are using. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGXvHa+gerLs4ltQ4RAu6eAJ9rAgo3ZSYT7IOkj9YP5ySuPoVFkwCfdARO M54huFuJk8+C49WTgsfk5/Y= =Av4D -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] a batch of inSaNitY!
You know I had considered using JS for dealing with this. It does make it much easier to change the CSS on your links to indicate current page and such. I might look into this again. Thanks! From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SpiderX Sent: Thursday, May 31, 2007 11:25 AM To: zope@zope.org Subject: Re: [Zope] a batch of inSaNitY! I just use Adobe Labs Spry Framework... this effectively puts the paging in javascript. On 5/31/07, Programmer [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Jonathan, I have something similar to your idea already. The python script supplies page number to a stored procedure which handles the actual paging. The script takes the result from the proc and builds an html table and handles column sorting on the table. The output of the script is just a single variable so I can just use dtml-var instead of the flaky dtml-in. Problem I have now is this new search interface makes use of full-text searching on SQL Server 2K. The paging proc wasn't written to handle it and will need to be rewritten from scratch. This will take a lot of time and testing. I thought I could slap something simple and fast together to use in the interim to allow people to start testing the search engine. I really do wish Zope would either fix or eliminate broken features. At the very least have the curtesy to say hey y'all, this is broke, don't bother so folks don't waste time with it. Mike -Original Message- From: Jonathan [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 30, 2007 5:22 PM To: Programmer; zope@zope.org Subject: Re: [Zope] a batch of inSaNitY! - Original Message - From: Programmer [EMAIL PROTECTED] To: zope@zope.org mailto:zope@zope.org Sent: Wednesday, May 30, 2007 4:44 PM Subject: [Zope] a batch of inSaNitY! Hi I am about to go stark, raving, frothing mad with the DTML-IN batching. Is there a known (or unknown) bug with this? I have searched and read everything I can find about this and no luck. The problem is with carrying the query terms over from one batch page to the next. Right now I am using the script found here: http://mail.zope.org/pipermail/zope-collector-monitor/2003-May/002001.ht ml Except I changed, dtml-let batch=_.range(100, 180) batch_size=10 batch_start=REQUEST.get('batch_start',1) To dtml-let batch=myZSQLMethod1 batch_size=10 batch_start=REQUEST.get('batch_start',1) The mySQLMethod1 takes two params which the search form supplies to REQUEST. This works great. The pagination works beautifully. However, when I use the very same result script with myZSQLMethod2 (same DB table), which takes 5 params (all optional) the pagination breaks and no-longer passes the query terms. I have checked and rechecked both scripts and both forms. The ZSQLMethods both test good. I am out of ideas. For the life of me I cannot figure out why I'm losing my query terms in one and not the other when the two are almost identical. Care to enlighten me with your collective wisdom? In similar situations I have done the following: 1) call a python script/external method which: (i) does the db search; (ii) formats the results as required for display; (iii) returns a tuple that contains: list of search results, url parameters for 'previous' link; url parameters for 'next' link; url parameters for 'first link'; url parameters for 'last' link 2) use a dtml method to call the script/ext.method like dtml-let rStat=mySearchRoutine(parm1, parm1, ...) dtml-in rStat[0] display code here eg. dtml-var sequence-itembr or could be an html/css table, etc. dtml-if sequence-end a href=...?dtml-var rStat[1]previous/a a href=...?dtml-var rStat[2]next/a a href=...?dtml-var rStat[3]first/a a href=...?dtml-var rStat[4]last/a /dtml-if /dtml-in /dtml-let This greatly simplifies the dtml and facilitates debugging and future modifications. hth Jonathan ___ Zope maillist -
Re: [Zope] Uncaptured python exception
The example 'var1 = var2' should cause the NameError exception. NameError: name 'var2' is not defined You might want to check your 'error log' objects for the error messages. If you don't have an error log object, it might be a good idea to create one. On 5/31/07, Maciej Wisniowski [EMAIL PROTECTED] wrote: Var1 = var2 Where var2 is undefined (i.e. has never been assigned anything) Just silent failure. No error. So how do you know there is a failure then? There is really nothing in event.log and nothing in error_log? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Thanks, Derek Wilson ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Function reindexObject()
julian wrote at 2007-5-30 18:00 +0200: ... I have made some python scripts to export data of some zope2.7 products in text file, and I have made some scripts to import theses data to rebuild products in zope2.9. Theses scripts run very well. But my problem is that all product that is rebuilt are in /SITES/plone_mySite/ I want rebuil all product in zope2.9 in the same directory as zope 2.7. I have the same structure for zope 2.7 and zope 2.9. My Import script - id = self.generateUniqueId('J_product') self.invokeFactory('J_product', id) This self controls where the new object is created. More precisely: obj.invokeFactory will create the new object in obj (provided obj has a method invokeFactory, if not invokeFactory may be acquired and the new object created in the object, invokeFactory was acquired from). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Jon Emmons wrote at 2007-5-31 11:06 -0400: ... I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. This is a *very* unusual behaviour of Zope. I have never seen it (or heard about it before your post). I know of only a single problem where Zope does not reliably report problems: when a product cannot be imported during startup, then the only hint may be in Zope's logfile -- especially, the product may not seem to be broken in Control_Panel -- Product management. But that is definitely not your problem. Syntax errors I can find by simply importing the external method into the python interpreter. But dealing with the form variables, I will often have runtime errors that give no message at all. I fear somehow you have screwed up your Zope. It behaves differently from how we know it. To be sure: you look into the error_log object in the ZMI, have removed any exceptions to be ignored and nevertheless do not see any error log messages there? -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] spam
Please help me. I have received and blocked 284 unsliced emails all from different zope based email addresses. Please remove me from your computers. I have regretted ever hearing your name. [EMAIL PROTECTED] - Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] a batch of inSaNitY!
This is curious... The problem I had with the searchterms not getting carried across pages seems to have gone away. Here's what I changed. The two search forms are separate dtml-methods and still are but I've included them into the main page template like I originally planned. Something like this: html body div dtml-var form1 /div div dtml-var form2 /div etc. etc. When the template is rendered both forms are rendered also. Except now nothing breaks. The result page dtml scripts are still the same. I'm scratching my head... At least people can test the search facility while a more permanent python + AJAX interfaces are built. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )