[Zope-dev] Zope Tests: 8 OK, 1 Failed
Summary of messages to the zope-tests list. Period Thu Nov 23 12:00:00 2006 UTC to Fri Nov 24 12:00:00 2006 UTC. There were 9 messages: 9 from Zope Unit Tests. Test failures - Subject: FAILED (failures=2) : Zope-2.8 Python-2.4.4 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:33:21 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006652.html Tests passed OK --- Subject: OK : Zope-2.6 Python-2.1.3 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:25:51 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006647.html Subject: OK : Zope-2.6 Python-2.3.6 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:27:21 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006648.html Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:28:51 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006649.html Subject: OK : Zope-2.7 Python-2.4.4 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:30:21 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006650.html Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:31:51 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006651.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:34:51 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006653.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:36:21 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006654.html Subject: OK : Zope-trunk Python-2.4.4 : Linux From: Zope Unit Tests Date: Thu Nov 23 21:37:51 EST 2006 URL: http://mail.zope.org/pipermail/zope-tests/2006-November/006655.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 )
Re: [Zope-dev] version.txt magic
Hi, Zope 2.9 and Zope 2.10 currently show up with unreleased version inside the control panel. App/version_txt.py tries to read the file lib/python/Zope2/version_txt. This file is usually created by the 'makefile'. The makefile of Zope 2.9 create the file in the proper location however in Zope 2.10 the makefile creates lib/python/version.txt. Is there a particular reason for this? I currently have now clue what is bug and what is intended behavior. Any insights? *sigh* :-) Hi Andreas, i got the same *error* on the new zope 2.10 instance. Installed over newly created zope2.10 debian package. - cs ___ 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] help performance
Jonathan wrote: - Original Message - From: Yuri [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, November 23, 2006 11:07 AM Subject: [Zope] help performance Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) You could try different transaction subcommit threshold settings (Catalog - Advanced tab) to see if different settings have any beneficial impact. Subtransactions are *Disabled :) * ___ 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] help performance
Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 23. November 2006 17:07:39 +0100 Yuri [EMAIL PROTECTED] wrote: Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( # more version.txt 1.7.2 for Zope 2.5.1 and 2.6.1, 2.7.3, 2.8, 2.9 Python 2.3.x, 2.4.x ___ 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] help performance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 11:16:50 +0100 Yuri [EMAIL PROTECTED] wrote: ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( Try CallProfiler instead. - -aj - -- ZOPYX Ltd. Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope Plone development, Consulting -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFZsd3CJIWIbr9KYwRAkt2AKCssal5dASk5L2Hr5Hx25NcP73HlACfd8sR zwcPSLgP0kd/wyMVPCtV4oU= =lx7b -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] help performance
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 11:20:39 +0100 Andreas Jung [EMAIL PROTECTED] wrote: ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( Try CallProfiler instead. and *enable* subtransactions! - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFZsfJCJIWIbr9KYwRAn4EAJ9NDvAQT4jOEcBSOEshEWz/I6EtEwCfepEK tPE8sMBxMQET/euEhCVAD5g= =FztJ -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] help performance
Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 11:20:39 +0100 Andreas Jung [EMAIL PROTECTED] wrote: ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( Try CallProfiler instead. and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) ___ 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] Specifying the target language with i18n
Hello, I am trying to set the target language using i18n:target label Example: p i18n:translate= i18n:target=string:en label_search /p It doesn't work. I cannot specify the target language. I am in Zope 2.9.4. Thank you. __ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.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] help performance
Yuri wrote: When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) You might be surprised... Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] help performance
On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. -- 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] help performance
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. ok, you got me :) with callprofiler I have: +0.0209 0.1213 1.4%+- inserimento +0.0461 0.0044 0.1%| +- standard_html_header +0.0479 0.0018 0.0%| | +- intestazione_html_standard +0.0518 0.0012 0.0%| | +- mappa_barra_loggato 0.0931 1.1%| | +0.1467 7.4849 85.1% | +- dafne_item_add 1.1709 13.3% | | | +1.3175 0.0027 0.0%| | +- proprietario +1.3245 0.0450 0.5%| | +- sonopubblico 0.1486 1.7%| | | +1.5181 0.0026 0.0%| | +- proprietario (2nd call) 1.3108 14.9% | | | +2.8316 0.0043 0.0%| | +- globale 4.6964 53.4% | | | +7.5323 0.0452 0.5%| | +- sonopubblico (2nd call) 0.1539 1.7%| | | +7.7324 0.0367 0.4%| +- invalida_cache +7.7704 0.0010 0.0%| +- standard_html_footer What does exactly take 4.6 sec? :-o ___ 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 )
[Fwd: Re: [Zope] help performance]
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. 0.0209 0.9%| +0.0209 0.0174 0.7%+- inserimento +0.0320 0.0042 0.2%| +- standard_html_header +0.0337 0.0017 0.1%| | +- intestazione_html_standard +0.0374 0.0011 0.0%| | +- mappa_barra_loggato +0.0423 1.0951 46.8% | +- dafne_item_add 0.5836 24.9% | | | +0.6260 0.0028 0.1%| | +- proprietario +0.6301 0.0484 2.1%| | +- sonopubblico +0.6804 0.0026 0.1%| | +- proprietario (2nd call) 0.0406 1.7%| | | +0.7236 0.0043 0.2%| | +- globale 0.4665 19.9% | | | +1.1945 0.0457 2.0%| | +- sonopubblico (2nd call) +1.2423 0.0033 0.1%| +- invalida_cache +1.2468 0.0010 0.0%| +- standard_html_footer Ok, I've run a machine for three years without any optimizations. Enabling transaction cut the time of about 73%: http://myurl/inserimento2.3416 5.5694 8.7971 8.7971, 2.3416 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- ___ 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: [Fwd: Re: [Zope] help performance]
On 11/24/06, Yuri [EMAIL PROTECTED] wrote: 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- Indeed. And if you tweak the threshold as Jonathan suggested, you could even get it lower. -- 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: [Fwd: Re: [Zope] help performance]
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- Indeed. And if you tweak the threshold as Jonathan suggested, you could even get it lower. Just to clarify, 2.3 sec is the time to insert only one object :) I'll try to tweak it as suggested by you gurus :P ___ 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: Specifying the target language with i18n
Hi Daniel, Hello, I am trying to set the target language using i18n:target label Example: p i18n:translate= i18n:target=string:en label_search /p It doesn't work. I cannot specify the target language. I am in Zope 2.9.4. Just a guess: Don't you need to specify a domain as well? Regards Josef ___ 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] error with simple python script loop
I have an problem with this little script. The script is in the zope file structure and it is an -Script (Python)- The script should send 2 emails over the mailhost, but it sends 4 emails. I have test this with maildrophost product too, same problem. I have test it on Zope 2.10.0 and Zope 2.64. The problem is the same - everytime. This script produce the error: start for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) end This script produce no error: start for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) return 'eof' end So if i make a return (not in the loop) the script works fine. Can anybody tell me why? It feels like that there are any spaces in the script and zope/python did not work correctly when there is no other procedure after the for loop. I dont understand why he calls the loop two times and produce 4 emails. There is no transactional error in the error_log. thx for help ___ 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] error with simple python script loop
Christian Steinhauer wrote: This script produce the error: start for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) end As I said in the tracker, no one can help you if you don't actually give us the full traceback and exception that you got. Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] error with simple python script loop
The script should send 2 emails over the mailhost, but it sends 4 emails. I have test this with maildrophost product too, same problem. I have test it on Zope 2.10.0 and Zope 2.64. The problem is the same - everytime. How do you call this script? Directly (via URL)? Or it is called by other script? -- 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] Re: Specifying the target language with i18n
It is not necesary. Anyway, if I specify my domain nothing happens. - Mensaje original De: Josef Meile [EMAIL PROTECTED] Para: zope@zope.org Enviado: viernes, 24 de noviembre, 2006 13:03:31 Asunto: [Zope] Re: Specifying the target language with i18n Hi Daniel, Hello, I am trying to set the target language using i18n:target label Example: p i18n:translate= i18n:target=string:en label_search /p It doesn't work. I cannot specify the target language. I am in Zope 2.9.4. Just a guess: Don't you need to specify a domain as well? Regards Josef ___ 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 ) __ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.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 )
[Zope] Re: Specifying the target language with i18n
Example: p i18n:translate= i18n:target=string:en label_search /p It doesn't work. I cannot specify the target language. I am in Zope 2.9.4. Just a guess: Don't you need to specify a domain as well? Ok, I tested it as well and it didn't work either. I just found it is a bug and here is a patch: http://www.zope.org/Collectors/Zope/1114 However be careful when using patches, specially when working with unicode data. You have to make sure they don't concatenate normal strings and unicode: This is really difficult to debug. I think that the i18n:target directive is only useful you want to show a text in a zpt which must be always rendered in the same language (ie: some governmental entities shows first an English version of a official document, then immediately above there is a version let's say in spanish). But if what you want is to change the language in the whole zpt, then implementing your IUserPreferredLanguages would do the trick. Regards Josef ___ 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] error with simple python script loop
As I said in the tracker, no one can help you if you don't actually give us the full traceback and exception that you got. There is no traceback, i got no error - thats why i have post it into bug tracker. I spoke to many people but no one can tell me why it occured. The most said that it must be a bug in zope or python. @Maciej: I call the script simple over url or the test button - it is a script for testing only - it is not called by any other script ___ 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] error with simple python script loop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 13:39:07 +0100 Christian Steinhauer [EMAIL PROTECTED] wrote: As I said in the tracker, no one can help you if you don't actually give us the full traceback and exception that you got. There is no traceback, i got no error - thats why i have post it into bug tracker. I spoke to many people but no one can tell me why it occured. The most said that it must be a bug in zope or python. Then it is time to address the issue on your own by taking pdb and making further investigations. - -aj -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFZuhaCJIWIbr9KYwRAhHmAJ9Swgqa2vsSLaSkO7KgS/GxOvot6ACgk5ms 8iDCMq7WZf3n4gq6qkEe/MQ= =Gmjt -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] error with simple python script loop
- Original Message - From: Christian Steinhauer [EMAIL PROTECTED] To: zope@zope.org Sent: Friday, November 24, 2006 7:12 AM Subject: [Zope] error with simple python script loop I have an problem with this little script. The script is in the zope file structure and it is an -Script (Python)- The script should send 2 emails over the mailhost, but it sends 4 emails. I have test this with maildrophost product too, same problem. I have test it on Zope 2.10.0 and Zope 2.64. The problem is the same - everytime. This script produce the error: start for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) end This script produce no error: start for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) return 'eof' end So if i make a return (not in the loop) the script works fine. Can anybody tell me why? It feels like that there are any spaces in the script and zope/python did not work correctly when there is no other procedure after the for loop. I dont understand why he calls the loop two times and produce 4 emails. There is no transactional error in the error_log. I just cut and pasted your code into a python script on my Zope installation (2.9.2) and it worked as expected (ie. 2 emails sent). So something is pooched in your installation. A quick way to check to see if your script is looping more than you expect is to do something like: loopCheck = [] for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) loopCheck.append(subj) return loopCheck If you are getting only 2 iterations of the loop (as it should be), then something is wrong with your MailHost (if this is the case try deleting it and re-adding it). Another test: place a local copy of MailHost in the same folder as your script and see what happens. 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 )
Re: [Zope] error with simple python script loop
I just cut and pasted your code into a python script on my Zope installation (2.9.2) and it worked as expected (ie. 2 emails sent). So something is pooched in your installation. A quick way to check to see if your script is looping more than you expect is to do something like: loopCheck = [] for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) loopCheck.append(subj) return loopCheck If you are getting only 2 iterations of the loop (as it should be), then something is wrong with your MailHost (if this is the case try deleting it and re-adding it). Another test: place a local copy of MailHost in the same folder as your script and see what happens. Hi Jonathan, thanks for taking care of the problem. I have done the self test you do with the list. But everytime when something is written at last line, example return 'eof' (My example in the topic) the error did not occured - so the list gives me 2 and i will get 2 emails. The error only occured when nothing is written under the loop. I have 2 real separeted dedicated servers, one with zope 2.6.4 and one with 2.10 - the problem occured on both servers. So i used the zope product MailDropHost too and get the self error on both server. With MailDropHost i can see a spooler - thats nice - but in the spooler i see 4 emails. So the Operating System or Exim get 4 Mails from Zope/Python. I´m using Debian Linux. ___ 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: [Zope-dev] version.txt magic
Zope 2.9 and Zope 2.10 currently show up with unreleased version inside the control panel. App/version_txt.py tries to read the file lib/python/Zope2/version_txt. This file is usually created by the 'makefile'. The makefile of Zope 2.9 create the file in the proper location however in Zope 2.10 the makefile creates lib/python/version.txt. Is there a particular reason for this? I currently have now clue what is bug and what is intended behavior. Any insights? *sigh* :-) Hi Andreas, i got the same *error* on the new zope 2.10 instance. Installed over newly created zope2.10 debian package. - cs ___ 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] error with simple python script loop
- Original Message - From: Christian Steinhauer [EMAIL PROTECTED] To: Jonathan [EMAIL PROTECTED]; zope@zope.org Sent: Friday, November 24, 2006 8:19 AM Subject: Re: [Zope] error with simple python script loop I just cut and pasted your code into a python script on my Zope installation (2.9.2) and it worked as expected (ie. 2 emails sent). So something is pooched in your installation. A quick way to check to see if your script is looping more than you expect is to do something like: loopCheck = [] for i in range(2): subj = str(i) + ' range python' context.MailHost.send('range test with python', [EMAIL PROTECTED], [EMAIL PROTECTED], subj) loopCheck.append(subj) return loopCheck If you are getting only 2 iterations of the loop (as it should be), then something is wrong with your MailHost (if this is the case try deleting it and re-adding it). Another test: place a local copy of MailHost in the same folder as your script and see what happens. Hi Jonathan, thanks for taking care of the problem. I have done the self test you do with the list. But everytime when something is written at last line, example return 'eof' (My example in the topic) the error did not occured - so the list gives me 2 and i will get 2 emails. The error only occured when nothing is written under the loop. I have 2 real separeted dedicated servers, one with zope 2.6.4 and one with 2.10 - the problem occured on both servers. So i used the zope product MailDropHost too and get the self error on both server. With MailDropHost i can see a spooler - thats nice - but in the spooler i see 4 emails. So the Operating System or Exim get 4 Mails from Zope/Python. I´m using Debian Linux. I tried to reproduce your '4 iteration' problem on my Zope 2.9.2 installation, but even by removing the 'return' statement I still got 2 loop iterations (and 2 emails). I have never written a python script that did not have a 'return' statement. I don't know if it is mandatory or not. I usually use python scripts as subroutines/functions and I always have a return statement (even if it is a bare return - ie. the return statement does not send back any data). As Andreas suggested, if you want to track this down you are going to have to use a debugger like pdb. 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] error with simple python script loop
I tried to reproduce your '4 iteration' problem on my Zope 2.9.2 installation, but even by removing the 'return' statement I still got 2 loop iterations (and 2 emails). I have never written a python script that did not have a 'return' statement. I don't know if it is mandatory or not. I usually use python scripts as subroutines/functions and I always have a return statement (even if it is a bare return - ie. the return statement does not send back any data). As Andreas suggested, if you want to track this down you are going to have to use a debugger like pdb. I have test the script on my local windows python version with an print statement, and it works fine - everytime - so its only on zope. i cant use pdb on zope´s python script i think? ___ 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] error with simple python script loop
Hi Jonathan, thanks for taking care of the problem. I have done the self test you do with the list. But everytime when something is written at last line, example return 'eof' (My example in the topic) the error did not occured - so the list gives me 2 and i will get 2 emails. So try without return, eg.: 1. create ZPT with id: 'counter' 2. edith 'counter' that it contains only '0' 3. Create Script (Python): val = context.counter() v = int(val)+1 context.counter.write(str(v)) and test this script with/without return. Then see what value is in 'counter' ZPT. I have always only +1 increment, and you? -- 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: error with simple python script loop
I have test the script on my local windows python version with an print statement, and it works fine - everytime - so its only on zope. i cant use pdb on zope´s python script i think? Are you using the same mail servers? Anyway, another thing you could do would be to run the script in debug mode: ''' home_instance/bin/zopectl debug Starting debugger (the name app is bound to the top-level Zope object) app.YourScript ''' You could perhaps trying to do a fresh install of python and zope (from sources) in your debian server and see if it works. Regards Josef ___ 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] error with simple python script loop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24 Nov 2006, at 14:38, Jonathan wrote: I have never written a python script that did not have a 'return' statement. I don't know if it is mandatory or not. I usually use python scripts as subroutines/functions and I always have a return statement (even if it is a bare return - ie. the return statement does not send back any data). It is not necessary to put in your own return statement. They just return None if no return statement is present, which is the same for normal Python code. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFFZwnJRAx5nvEhZLIRAhIiAJ9mNhtpO0bV6lo7i11hRtqjlhlXBwCfSATl gsBBHxu8iQAj8j3YcBvW8CM= =qyQh -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: AW: [Zope-DB] [ANN] Modified version of DCOracle2 is available
you remember my report http://mail.zope.org/pipermail/zope/2005-August/160762.html of an BUG for the handling of LONGs in DCO2? In fact I forgot about this... The consequence of this BUG is stochastic results for LONG fields We use an Fix of this BUG: I've put your code into dco2.c. Thank you very much for these fixes. -- Maciej Wisniowski ___ Zope-DB mailing list Zope-DB@zope.org http://mail.zope.org/mailman/listinfo/zope-db