[Zope] Re: How can I import python script into another python script?
Gabriel Genellina wrote: At Thursday 31/8/2006 18:11, Ferhat Ayaz wrote: I have a Script (Python) called 'functions'. I want to import this script into another Script (Python). import Include.Functions.requests says import of Include.Functions.requests is unauthorized You don't import it; you can reference it as container.Include.Functions.whatever(args...) Or even do: Functions = container.Include.Functions and then reference: Functions.whatever() But do yourself a favour and extract the functions out of your Python script into a Python module. It will run faster and be easier to maintain and to debug. ___ 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] dtml-in sorting bug (collector #1884)
r.__cmp__(x,y) requires y to be a 'r', not a 'ImplicitAcquirerWrapper' http://www.zope.org/Collectors/Zope/1884 I see this is a pending case but does anyone have any idea if it will be fixed in future releases? Finally got a 2.8.8 instance running with our Data (from 2.7.5) and was able to run the catalog index fixer with help from Chris Withers (THANKS!!) and all was looking good. The pages that looked up news stories from the catalog are looking good. Then I went to a page that displayed Houses (from ZSQL methods) and does a sort on the results as is the case in MANY pages we have. The top line is the result on the error page. Seems its a well know bug but does not look like its an issue to most but it is to us. Any ideas?? Thanks Allen ___ 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] dtml-in sorting bug (collector #1884)
--On 1. September 2006 07:46:33 -0400 Allen Schmidt Sr. [EMAIL PROTECTED] wrote: r.__cmp__(x,y) requires y to be a 'r', not a 'ImplicitAcquirerWrapper' http://www.zope.org/Collectors/Zope/1884 I see this is a pending case but does anyone have any idea if it will be fixed in future releases? Finally got a 2.8.8 instance running with our Data (from 2.7.5) and was able to run the catalog index fixer with help from Chris Withers (THANKS!!) and all was looking good. The pages that looked up news stories from the catalog are looking good. Then I went to a page that displayed Houses (from ZSQL methods) and does a sort on the results as is the case in MANY pages we have. The top line is the result on the error page. Seems its a well know bug but does not look like its an issue to most but it is to us. Bugs are fixed on a voluntary basis. The chance having it fixed for the next version is higher when you work on a patch and tests. I doubt that this issue has a high priority for most of the core developers. -aj pgp3g0Mpp2CEg.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] Re: How can I import python script into another python script?
Thanks, it's just a little function (3-5 lines) and uses the REQUEST object. It will lookup for request parameters, if not found, a default value will be returned. But your suggestion can make the code more readable. Greets, Ferhat --- Duncan Booth [EMAIL PROTECTED] wrote: Gabriel Genellina wrote: At Thursday 31/8/2006 18:11, Ferhat Ayaz wrote: I have a Script (Python) called 'functions'. I want to import this script into another Script (Python). import Include.Functions.requests says import of Include.Functions.requests is unauthorized You don't import it; you can reference it as container.Include.Functions.whatever(args...) Or even do: Functions = container.Include.Functions and then reference: Functions.whatever() But do yourself a favour and extract the functions out of your Python script into a Python module. It will run faster and be easier to maintain and to debug. ___ 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 ) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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] insert_id with MySQL an Z SQL Method
Hi, I have a Z SQL Method with an insert expression. To the inserted row will be assigned an auto_increment id. How can I get the last inserted id? I tryed the following both commands in one Z SQL method. Unfortunatly this produces an error. insert into categories (parent_id,logo,active) values ( dtml-sqlvar parent_id type=int, dtml-sqlvar logo type=string, dtml-sqlvar active type=int, ); SELECT currval('table_id_seq'); Thanks for your helps Greets, Ferhat __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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] insert_id with MySQL an Z SQL Method
Search the mailing list archives for July - there were several contributions to this question. Roughly: insert ... dtml-var sql_delimiter select LAST_INSERT_ID() as table_id_seq Cliff Ferhat Ayaz wrote: Hi, I have a Z SQL Method with an insert expression. To the inserted row will be assigned an auto_increment id. How can I get the last inserted id? I tryed the following both commands in one Z SQL method. Unfortunatly this produces an error. insert into categories (parent_id,logo,active) values ( dtml-sqlvar parent_id type=int, dtml-sqlvar logo type=string, dtml-sqlvar active type=int, ); SELECT currval('table_id_seq'); Thanks for your helps Greets, Ferhat __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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 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] insert_id with MySQL an Z SQL Method
I have been using this successfully for a while. Don't remember where I found out about it though: insert stuff... dtml-var sql_delimiter select alert_id from entertainment_alerts where alert_id = @@identity Allen Cliff Ford wrote: Search the mailing list archives for July - there were several contributions to this question. Roughly: insert ... dtml-var sql_delimiter select LAST_INSERT_ID() as table_id_seq Cliff Ferhat Ayaz wrote: Hi, I have a Z SQL Method with an insert expression. To the inserted row will be assigned an auto_increment id. How can I get the last inserted id? I tryed the following both commands in one Z SQL method. Unfortunatly this produces an error. insert into categories (parent_id,logo,active) values ( dtml-sqlvar parent_id type=int, dtml-sqlvar logo type=string, dtml-sqlvar active type=int, ); SELECT currval('table_id_seq'); Thanks for your helps Greets, Ferhat __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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 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 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] insert_id with MySQL an Z SQL Method
Thanks for the answers. The keyword I missed was dtml-var sql_delimiter. Now it's working. Here my complete Z SQL Method: --- insert into categories (parent_id,logo,active) values ( dtml-sqlvar parent_id type=int, dtml-sqlvar logo type=string, dtml-sqlvar active type=int ) dtml-var sql_delimiter select LAST_INSERT_ID() as table_id_seq --- --- Allen Schmidt Sr. [EMAIL PROTECTED] wrote: I have been using this successfully for a while. Don't remember where I found out about it though: insert stuff... dtml-var sql_delimiter select alert_id from entertainment_alerts where alert_id = @@identity Allen Cliff Ford wrote: Search the mailing list archives for July - there were several contributions to this question. Roughly: insert ... dtml-var sql_delimiter select LAST_INSERT_ID() as table_id_seq Cliff Ferhat Ayaz wrote: Hi, I have a Z SQL Method with an insert expression. To the inserted row will be assigned an auto_increment id. How can I get the last inserted id? I tryed the following both commands in one Z SQL method. Unfortunatly this produces an error. insert into categories (parent_id,logo,active) values ( dtml-sqlvar parent_id type=int, dtml-sqlvar logo type=string, dtml-sqlvar active type=int, ); SELECT currval('table_id_seq'); Thanks for your helps Greets, Ferhat __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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 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 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 ) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.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-Annce] z3wingdbg 0.2.0: Wing IDE debugger integration for Zope3
I'm pleased to announce the second alpha release of z3wingdbg, a Zope3 package integrating debug support for the Wing IDE into Zope3. z3wingdbg sets you up with a seperate single-threaded HTTP server through which all requests are under the control of the Wing Debugger. This second release provides the almost the same functionality as it's Zope2 equivalent, including accepting connections (have the IDE initialize the connection) has not been implemented. Future releases will include a more user-friendly interface to configuring the package and other server types, such as FTP and SSH. Project homepage (including downloads) http://www.zopatista.com/projects/z3wingdbg Development http://trac.zopatista.com/zopatista/z3wingdbg Subversion Repository https://svn.zopatista.com/zopatista/z3wingdbg http://trac.zopatista.com/zopatista/browser/z3wingdbg Reporting bugs, feature requests http://trac.zopatista.com/zopatista/ Martijn Pieters signature.asc Description: OpenPGP digital signature ___ Zope-Announce maillist - Zope-Announce@zope.org http://mail.zope.org/mailman/listinfo/zope-announce Zope-Announce for Announcements only - no discussions (Related lists - Users: http://mail.zope.org/mailman/listinfo/zope Developers: http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/ObjectManager.py Merged r69910:69911 from 2.8 branch.
Log message for revision 69915: Merged r69910:69911 from 2.8 branch. Help avoid acquisition disaster in Folder.manage_main (main.dtml). Changed: U Zope/trunk/lib/python/OFS/ObjectManager.py -=- Modified: Zope/trunk/lib/python/OFS/ObjectManager.py === --- Zope/trunk/lib/python/OFS/ObjectManager.py 2006-09-01 13:18:39 UTC (rev 69914) +++ Zope/trunk/lib/python/OFS/ObjectManager.py 2006-09-01 13:20:03 UTC (rev 69915) @@ -167,6 +167,8 @@ isPrincipiaFolderish=1 +has_order_support = 0 # See OrderSupport.py + # IPossibleSite API _components = None ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml Acquisition disaster part II.
Log message for revision 69916: Acquisition disaster part II. Changed: U Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml -=- Modified: Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml === --- Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml 2006-09-01 13:20:03 UTC (rev 69915) +++ Zope/branches/Zope-2_8-branch/lib/python/OFS/dtml/main.dtml 2006-09-01 13:23:57 UTC (rev 69916) @@ -61,7 +61,7 @@ form action=dtml-URL1;/ name=objectItems method=post dtml-if objectItems - dtml-let hasOrderSupport=_.hasattr(this().aq_self, 'has_order_support') + dtml-let hasOrderSupport=_.getattr(this().aq_explicit, 'has_order_support', 0) dtml-unless skey dtml-if hasOrderSupport dtml-call expr=REQUEST.set('skey', getDefaultSorting()[0]) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.10/lib/python/OFS/dtml/main.dtml Merged r69915:69916 from 2.8 branch.
Log message for revision 69918: Merged r69915:69916 from 2.8 branch. Changed: U Zope/branches/2.10/lib/python/OFS/dtml/main.dtml -=- Modified: Zope/branches/2.10/lib/python/OFS/dtml/main.dtml === --- Zope/branches/2.10/lib/python/OFS/dtml/main.dtml2006-09-01 13:25:45 UTC (rev 69917) +++ Zope/branches/2.10/lib/python/OFS/dtml/main.dtml2006-09-01 13:26:44 UTC (rev 69918) @@ -61,7 +61,7 @@ form action=dtml-URL1;/ name=objectItems method=post dtml-if objectItems - dtml-let hasOrderSupport=_.hasattr(this().aq_self, 'has_order_support') + dtml-let hasOrderSupport=_.getattr(this().aq_explicit, 'has_order_support', 0) dtml-unless skey dtml-if hasOrderSupport dtml-call expr=REQUEST.set('skey', getDefaultSorting()[0]) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/dtml/main.dtml Merged r69915:69916 from 2.8 branch.
Log message for revision 69919: Merged r69915:69916 from 2.8 branch. Changed: U Zope/trunk/lib/python/OFS/dtml/main.dtml -=- Modified: Zope/trunk/lib/python/OFS/dtml/main.dtml === --- Zope/trunk/lib/python/OFS/dtml/main.dtml2006-09-01 13:26:44 UTC (rev 69918) +++ Zope/trunk/lib/python/OFS/dtml/main.dtml2006-09-01 13:27:31 UTC (rev 69919) @@ -61,7 +61,7 @@ form action=dtml-URL1;/ name=objectItems method=post dtml-if objectItems - dtml-let hasOrderSupport=_.hasattr(this().aq_self, 'has_order_support') + dtml-let hasOrderSupport=_.getattr(this().aq_explicit, 'has_order_support', 0) dtml-unless skey dtml-if hasOrderSupport dtml-call expr=REQUEST.set('skey', getDefaultSorting()[0]) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins
[Zope-dev] ZCatalog Key Error question
I have a Zope product that relies heavily on a ZCatalog to search for objects within a folder matching certain criteria. The ZCatalog frequently becomes corrupt, and on searching the catalog, the catalog gives me key errors. I'm trying to figure out what causes the corruption so I can stop doing whatever I am doing to corrupt the ZCatalog. Here are the clues: 1. When I re-index the catalog, everything works fine. Unfortunately, I cannot re-index the catalog very frequently because it takes a long time 2. The objects that are indexed are Citation objects, a class I defined. 3. The Citation class extends CatalogAware (as well as Item,Persistent,Implicit, PropertyManager) 4. Every time I change a citation, I call reindex_object() (on the citation) 5. When I add a citation, I call reindex_object() on the citation immediately. 6. I'm using Zope 2.8.4-final, built from source. 7. I'm using python 2.3.5 Thank you in advance. I can provide more information upon request. Best, Brian Rosenthal Brian Rosenthal General Partner, RoboCommerce, LLC [EMAIL PROTECTED] http://www.robocommerce.com 800-644-7626 ___ 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] ZODB.POSException.ConflictError on attribute assignment
I'm getting a ZODB.POSException.ConflictError in the following code in a Custom Zope Product, and I'm hoping someone can enlighten me on how to fix it. # nd is a folder with a sub-folder Categories # NDCategory is a custom Zope product I wrote that does not have anything called bogus defined. categories = nd.Categories.objectValues('NDCategory') for cat in categories: cat.bogus = [] Can anyone explain this to me? Thank you in advance, Brian Rosenthal Brian Rosenthal General Partner, RoboCommerce, LLC [EMAIL PROTECTED] http://www.robocommerce.com 800-644-7626 ___ 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] ZCatalog Key Error question
--On 1. September 2006 02:54:26 -0400 [EMAIL PROTECTED] wrote: I have a Zope product that relies heavily on a ZCatalog to search for objects within a folder matching certain criteria. The ZCatalog frequently becomes corrupt, and on searching the catalog, the catalog gives me key errors. I'm trying to figure out what causes the corruption so I can stop doing whatever I am doing to corrupt the ZCatalog. Read or Write conflict errors? Are the objects modified at the same time by other threads? -aj pgpRrhqcwgEtE.pgp Description: PGP signature ___ 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] Help! Getting there, I hope ...
Right, many thanks to those who have offered advice. I'm conscious that as I've drifted from a coding topic then I'm probably in the wrong mailing list, but everyone has been very patient up to now and I'm hoping that a fix is in sight! :) I have done a backup of the Dats.fs file (took three days!). I have used fsdump and fstest to produce listings about my Data.fs file - fsdump produced a 2.67GB textfile! I have tracked down the first entry that I believe begins all the deletes: tid=0367c03fc4325022 time=2006-08-26 08:31:45.983563 offset=749481328632 user= admin description=/library/reference/manage_delObjects If I'm right ... does that mean if I trim the Data.fs file to 749481328632 bytes long and start Zope off again, that the files should be restored? If so, does anyone know of a good way of trimming such a large binary file down to a specific size? I'm using Suse Linux as a server. Cheers, and thanks again, Kris. www.danceswithferrets.org ___ 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] ZODB.POSException.ConflictError on attribute assignment
[EMAIL PROTECTED] wrote: I'm getting a ZODB.POSException.ConflictError in the following code in a Custom Zope Product, Google for ConflictError Zope and read, a lot. These are to be expected due to Zope's concurrency model, but if end users are seeing them then your application needs restructuring. # nd is a folder with a sub-folder Categories # NDCategory is a custom Zope product I wrote that does not have anything called bogus defined. categories = nd.Categories.objectValues('NDCategory') for cat in categories: cat.bogus = [] how many categories are there and how often does this code get executed? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ 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] buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7403 Blamelist: alecm,andreasjung,andrew,dobe,fdrake,gintautasm,jim,jukart,mgedmin,mj,mkerrin,niemeyer,opetznick,philikon,shh,srichter,tseaver,yusei BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Windows 2000 zc-bbwin2. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7403 Blamelist: alecm,andreasjung,andrew,dobe,fdrake,gintautasm,jim,jukart,mgedmin,mj,mkerrin,niemeyer,opetznick,philikon,shh,srichter,tseaver,yusei BUILD FAILED: failed compile sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.10 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7404 Blamelist: alecm,andreasjung,andrew,dobe,fdrake,gintautasm,jim,jukart,mgedmin,mj,mkerrin,niemeyer,opetznick,philikon,shh,srichter,tseaver,yusei BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope trunk 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7406 Blamelist: andrew,dobe,fdrake,gintautasm,jim,jukart,mgedmin,mj,mkerrin,niemeyer,opetznick,philikon,shh,srichter,yusei BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.9 2.4 Windows 2000 zc-bbwin2
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Windows 2000 zc-bbwin2. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7408 Blamelist: gintautasm,shh BUILD FAILED: failed compile sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.9 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.9 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7408 Blamelist: gintautasm,shh BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope branches 2.10 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope branches 2.10 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7409 Blamelist: shh BUILD FAILED: failed test sincerely, -The Buildbot ___ 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] buildbot failure in Zope trunk 2.4 Linux zc-buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Linux zc-buildbot. Buildbot URL: http://buildbot.zope.org/ Build Reason: changes Build Source Stamp: 7410 Blamelist: shh BUILD FAILED: failed test sincerely, -The Buildbot ___ 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: Help! Getting there, I hope ...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kris Adcock wrote: Right, many thanks to those who have offered advice. I'm conscious that as I've drifted from a coding topic then I'm probably in the wrong mailing list, but everyone has been very patient up to now and I'm hoping that a fix is in sight! :) I have done a backup of the Dats.fs file (took three days!). I have used fsdump and fstest to produce listings about my Data.fs file - fsdump produced a 2.67GB textfile! I have tracked down the first entry that I believe begins all the deletes: tid=0367c03fc4325022 time=2006-08-26 08:31:45.983563 offset=749481328632 user= admin description=/library/reference/manage_delObjects If I'm right ... does that mean if I trim the Data.fs file to 749481328632 bytes long and start Zope off again, that the files should be restored? If so, does anyone know of a good way of trimming such a large binary file down to a specific size? I'm using Suse Linux as a server. I would use the ZODB's 'copyTransactionsFrom' here. Something like the following (untested):: from ZODB.FileStorage import FileStorage old_fs = FileStorage('/path/to/backup_Data.fs', read_only=True) iter = old_fs.iterator(stop='2006-08-26 08:31:45.983563') new_fs = FileStorage('/path/to/truncated_Data.fs', create=True) new_fs.copyTransactionsFrom(iter) new_fs.close() old_fs.close() Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE+Ell+gerLs4ltQ4RAlH3AJ9dhknpenEnFDMS7U4gf3c2QaKHRgCgpa85 hKZQ42Lg860OSh2AWWRvs0w= =AIRi -END PGP SIGNATURE- ___ 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] ZODB.POSException.ConflictError on attribute assignment
how many categories are there and how often does this code get executed? It's only one user and within one request where this is happening. I'm using ZEO. There must be something I fundamentally don't understand about how I assign an attribute to an object in the ZODB. If you have any insight nere, I'd appreciate it. Best, Brian On Fri, 01 Sep 2006 09:40:24 +0100, Chris Withers [EMAIL PROTECTED] said: [EMAIL PROTECTED] wrote: I'm getting a ZODB.POSException.ConflictError in the following code in a Custom Zope Product, Google for ConflictError Zope and read, a lot. These are to be expected due to Zope's concurrency model, but if end users are seeing them then your application needs restructuring. # nd is a folder with a sub-folder Categories # NDCategory is a custom Zope product I wrote that does not have anything called bogus defined. categories = nd.Categories.objectValues('NDCategory') for cat in categories: cat.bogus = [] how many categories are there and how often does this code get executed? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk Brian Rosenthal General Partner, RoboCommerce, LLC [EMAIL PROTECTED] http://www.robocommerce.com 800-644-7626 ___ 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] ZCatalog Key Error question
Read or Write conflict errors? I'm getting the Key Error traceback on Reads, but my guess is that the actual error happens sometime before the Key Error, when the ZCatalog itself is corrupted. I am not sure what that is, because it does not generate an error. However, I see the error when I call ZCatalogInstance.Search(...), and only when the Search includes objects that are corrupted in the ZCatalog. Are the objects modified at the same time by other threads? I'm not sure about this. I'm running ZEO, and in general, I think I can cause the error when I am the only user on the system, only issuing one request. However, I'm getting another ConflictError when I try to set an attribute value of a ZODB object during the execution of a script, and I'm told that may be because there is a problem accessing the same object from multiple threads. Is there a good article that you know of that I could find out more about thread-safe programming in ZEO? Best, Brian On Fri, 01 Sep 2006 09:27:41 +0200, Andreas Jung [EMAIL PROTECTED] said: --On 1. September 2006 02:54:26 -0400 [EMAIL PROTECTED] wrote: I have a Zope product that relies heavily on a ZCatalog to search for objects within a folder matching certain criteria. The ZCatalog frequently becomes corrupt, and on searching the catalog, the catalog gives me key errors. I'm trying to figure out what causes the corruption so I can stop doing whatever I am doing to corrupt the ZCatalog. Read or Write conflict errors? Are the objects modified at the same time by other threads? -aj Brian Rosenthal General Partner, RoboCommerce, LLC [EMAIL PROTECTED] http://www.robocommerce.com 800-644-7626 ___ 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] ZCatalog Key Error question
[EMAIL PROTECTED] wrote at 2006-9-1 02:54 -0400: I have a Zope product that relies heavily on a ZCatalog to search for objects within a folder matching certain criteria. The ZCatalog frequently becomes corrupt, and on searching the catalog, the catalog gives me key errors. I'm trying to figure out what causes the corruption so I can stop doing whatever I am doing to corrupt the ZCatalog. Here are the clues: You forget to provide us with an essential glue: The complete error information (error type, error value and traceback). You find it in your error_log object (in Zope's Root Folder). -- 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 )
Re: [Zope-dev] Help! Getting there, I hope ...
Kris Adcock wrote at 2006-9-1 09:33 +0100: Right, many thanks to those who have offered advice. I'm conscious that as I've drifted from a coding topic then I'm probably in the wrong mailing list, but everyone has been very patient up to now and I'm hoping that a fix is in sight! :) I have done a backup of the Dats.fs file (took three days!). I have used fsdump and fstest to produce listings about my Data.fs file - fsdump produced a 2.67GB textfile! I have tracked down the first entry that I believe begins all the deletes: tid=0367c03fc4325022 time=2006-08-26 08:31:45.983563 offset=749481328632 user= admin description=/library/reference/manage_delObjects You can truncate your file to the given offset. This will remove any modifications after this time. -- 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 )
Re: [Zope-dev] ZCatalog Key Error question
Traceback for my Key Error (Dieter, thank you for alerting me on where to find this): Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Shared.DC.Scripts.Bindings, line 311, in __call__ Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec Module Products.PythonScripts.PythonScript, line 323, in _exec Module None, line 11, in to_javascript - PythonScript at /nephron_links/to_javascript used for /nephron_links/news_dtml - Line 11 Module OFS.DTMLDocument, line 128, in __call__ - DTMLDocument at /nephron_links/news_dtml - URL: http://nephron.org/news_dtml/manage_main - Physical Path: /nephron_links/news_dtml Module DocumentTemplate.DT_String, line 476, in __call__ Module DocumentTemplate.DT_In, line 465, in renderwb Module DocumentTemplate.DT_In, line 747, in sort_sequence Module Products.ZCatalog.Lazy, line 158, in __getitem__ Module Products.ZCatalog.Catalog, line 520, in getScoredResult KeyError: -464571725 On Fri, 1 Sep 2006 19:11:12 +0200, Dieter Maurer [EMAIL PROTECTED] said: [EMAIL PROTECTED] wrote at 2006-9-1 02:54 -0400: I have a Zope product that relies heavily on a ZCatalog to search for objects within a folder matching certain criteria. The ZCatalog frequently becomes corrupt, and on searching the catalog, the catalog gives me key errors. I'm trying to figure out what causes the corruption so I can stop doing whatever I am doing to corrupt the ZCatalog. Here are the clues: You forget to provide us with an essential glue: The complete error information (error type, error value and traceback). You find it in your error_log object (in Zope's Root Folder). -- Dieter Brian Rosenthal General Partner, RoboCommerce, LLC [EMAIL PROTECTED] http://www.robocommerce.com 800-644-7626 ___ 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] ZODB.POSException.ConflictError on attribute assignment
On 9/1/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm getting a ZODB.POSException.ConflictError in the following code in a Custom Zope Product, and I'm hoping someone can enlighten me on how to fix it. # nd is a folder with a sub-folder Categories # NDCategory is a custom Zope product I wrote that does not have anything called bogus defined. categories = nd.Categories.objectValues('NDCategory') for cat in categories: cat.bogus = [] Feels like you might be miss interpreting what a ConflictError is. With some hand waving... ConflictErrors are _not_ a mechanism for prohibiting attribute assignment because that attribute already exists. Instead ConflictErrors are a mechanism to prohibit inadvertent concurrent updates of the same attribute. (Or in older ZODB's, even concurrent reading of an attribute that is being written too.) Check the traceback for your ConflictError to get some details about just what is in conflict. Also might be worth a look in the access logs to see what else might be happening on the server at about the same time. Cheers Michael ___ 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 )