[Zope-dev] ZPatterns example update....
Hi Folks, The Dumb ZPatterns example is updated. Now there is some more realistic object referencing going on, borrowing of code snippets between Specialists and suchlike. There is also more in the way of reasonable documentation, though everything is in flux, and it still doesn't resemble a truly completed product. I just feel the need to get things finished enough that I can stop thinking about them for a while. ;-) In particular there the ToDos now hold references to Doer and Deliverable, and no 'lists' are maintained. One thing I need to do is to have these references automatically 'fixed' when a 'referred to' entity is removed or modified in such a way that the link should be broken that's for the next version. If I'm not careful.. it won't be a 'simple' example anymore. There's got to be a line here somewhere (in the sand?). take care, -steve ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns question
Hi Christian, Well, nobody else answered that I saw... so I'll take a crack at your questions "CS" == Christian Scholz [EMAIL PROTECTED] writes: CS Hi there! CS Finally I managed to get a basic understanding of how to do CS things with ZPatterns ;-) So seems quite cool :) (and CS hopefully I find some time to write some basic howto about it) CS But I have some little questions: CS 1. Is it possible to retrieve the set of known IDs from a CS specialist? Or would I need to add my own method to it which CS does this (and change it accordingly if I switch to another CS storage method)? If you store persistently you can use the Rack's method: "defaultRack.getPersistentItemIDs()" but a couple of notes: 1) this returns a BTree object, not a simple list, so you can't iterate through it in DTML. You'll need to copy it to a simple list for that.. and 2) If you change to a different storage you'll need to create your own method (ZSQL Method?). What I've found is that if you have a large number of objects you'll either want to query a Catalog, or an SQL database to get Ids that match some criteria that limit the number of hits to something that makes sense to display in a browser. CS 2. Is it planned to provide something like a virtual folder CS which acts like a normal object manager but is controlled via CS ZPatterns (so actually something like Folder with Customizer CS Support just without the "anchor" in ZODB. (would also CS require some mechanism asked for in 1.) Hmmm... I'm not sure what you're after here. Why not just use a Specialist? In what sense do you want it to be virtual? (Are you looking for a dynamic traversal interface that would allow you to map URLs to objects that are managed by ZPatterns? Can you give an example?) CS 3. Is it possible to use ZPatterns also without some exta CS ZClass defined in a Product? At least if I don't need methods CS for my objects but simple want to define the attribute they CS know. Would be nice as I could then hold everything together CS in one place (the specialist that is) without requiring to CS install something also in the Products folder of the Control CS Panel. I believe you need to either create a Python subclass, or a ZClass subclass of DataSkin. "Raw" DataSkins don't have the right permissions to allow for TTW access. If you're creating a 'product' anyway... just make a 'dummy' class that you can use for storage. CS That's it for now, I will keep experimenting then.. :) Good Luck! -steve CS cheers, Christian CS -- Christian Scholz MrTopf@IRC COM.lounge CS http://comlounge.net/ communication design [EMAIL PROTECTED] CS ___ Zope-Dev CS maillist - [EMAIL PROTECTED] CS http://lists.zope.org/mailman/listinfo/zope-dev ** No cross CS posts or HTML encoding! ** (Related lists - CS http://lists.zope.org/mailman/listinfo/zope-announce CS http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns question
Steve Spicklemire wrote: CS 2. Is it planned to provide something like a virtual folder CS which acts like a normal object manager but is controlled via CS ZPatterns (so actually something like Folder with Customizer CS Support just without the "anchor" in ZODB. (would also CS require some mechanism asked for in 1.) Hmmm... I'm not sure what you're after here. Why not just use a Specialist? In what sense do you want it to be virtual? (Are you looking for a dynamic traversal interface that would allow you to map URLs to objects that are managed by ZPatterns? Can you give an example?) Reading this just after reading the source to Specialists.py, I had a thought; and tried it out; and it works! :-) You can use SkinScript to define __bobo_traverse__ for a particular kind of DataSkin in a Specialist. For example: WITH SELF COMPUTE __bobo_traverse__=traversal_method Then, define a method in the specialist (or rack) called traversal_method. I used a PythonScript, and gave it the parameter list "REQUEST, name". Make your method return the appropriate object to traverse to from your DataSkin, depending on the name passed. Something like return getattr(container.path.to.somewhere, name) That's the simple version, and it won't give the traversed-to object the correct context most of the time. To do that, I'd need to use an external method, and use the __of__ method to give the returned object an appropriate context. However, it is a start, and proves that it can be done. Take a look in the __bobo_traverse__ method of Specialists.py (from ZPatterns) for a good algorithm for traversal. The variable _marker is almost always a class attribute initialized to [], to make a unique object, as a sentinel. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] ZPatterns question
Steve Alexander wrote: return getattr(container.path.to.somewhere, name) That's the simple version, and it won't give the traversed-to object the correct context most of the time. To do that, I'd need to use an external method, and use the __of__ method to give the returned object an appropriate context. However, if all you are doing is saying "does this object have the named attribute? if not, get it from another specialist", and you're using Specialist.getItem() to do the latter part, then the object you want comes ready-wrapped in the appropriate context, courtesy of the Rack that gives it to you! -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope] ImportError on Zope 2.3.0 alpha 1
The following method worked on 2.2.4, but fails on 2.3.0a1: dtml-call "REQUEST.set('newdoc','tdoc')" dtml-call "manage_addProduct['OFSP'].manage_addDTMLDocument(newdoc,newdoc,file =URL)" dtml-with "_.getitem(newdoc)" dtml-call "manage_addProperty('newprop','hello','string')" /dtml-with Actually, "manage_addProperty" doesn't seem to work at all, throwing an error message like Error Type: ImportError Error Value: cannot import name checkValidId Traceback (innermost last): ... File /home/strobl/Zope-2.3.0a1-src/lib/python/OFS/PropertyManager.py, line 247, in _setProperty (Object: testdoc) ImportError: (see above) Indeed, line 247 (and 248) contain a mistake. Changing from ObjectManager import checkValidId checkValidId(self, id) to from ObjectManager import check_valid_id check_valid_id(self, id) fixes the problem. A quick search only finds a single definition/use of check_valid_id aka checkValidId. What do the Zope naming rules say about how such a method has to be named? On 11 Dec 2000, 16:59 Brian Lloyd wrote: http://www.zope.org/Products/Zope/2.3.0a1/ -- o ( [EMAIL PROTECTED] (+49 2241) 14-2394 /\* GMD mbH #include _`\ `_=== Schloss Birlinghoven, std.disclaimer __(_)/_(_)___.-._ 53754 Sankt Augustin, Germany ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] is it possible to import from Excel
When on a windows platform, I prefer to define an ODBC datasource on the excel spreadsheet, write ZSQL method that selects the fields to be imported, write a DTML method that iterates on returned records and call another ZSQL method that writes into Gadfly. You may need to handle None/Missing values to prevent from ending up in gadfly as 'None' etc. If your not want to be tied to ODBC and Excel on the deployment platform, you can always try saving the content of the Excel sheet in a text format, if that is possible for your kind of data? The text file could then be parsed by at external method or even imported to the TinyTable product. On lage amounts of data this could be quite time consuming. So it would probably be more efficient to write a seperate import program. There might even be one for Gadfly. In that way you don't have to use a "unreliable" HTTP connection when importing data. That's my 25 öre (which is approximatly 5 cents) Regards, Johan Carlsson "How about Office 2000? Can it export data as XML? And in that case, can it describe more things than just values in a text export?" ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] index_html woes - solved!
However this is not working, anymore I might add. I cannot say what I have done wrong. The only thing I've done is to add and remove SiteRoots with SiteAccess2 (which btw i cannot make work, and has caused my zope to die abruptly, w/o leaving trace in the logs). I don't know if this is related, but i thought i'd mention it anyway. Hello! I solved this myself. Naturally, it was my own stupidity: it turns out that in order to have a template permeate down to the sub-folders, it is necessary to make it a dtml-method and not a dtml-document. Now that I recreated my pieces as dtml-methods it all works as a charm. Lesson learned: need to catch up on acquisition mechanism :-) Sincerely, /dario - Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology [EMAIL PROTECTED] ICQ will yield no hitsIT Systems Services ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] ImportError on Zope 2.3.0 alpha 1
There was a typo in the a1 release - that is fixed for a2. Thanks! Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Wolfgang Strobl Sent: Thursday, December 28, 2000 4:19 AM To: [EMAIL PROTECTED] Subject: [Zope] ImportError on Zope 2.3.0 alpha 1 The following method worked on 2.2.4, but fails on 2.3.0a1: dtml-call "REQUEST.set('newdoc','tdoc')" dtml-call "manage_addProduct['OFSP'].manage_addDTMLDocument(newdoc,newdoc,file =URL)" dtml-with "_.getitem(newdoc)" dtml-call "manage_addProperty('newprop','hello','string')" /dtml-with Actually, "manage_addProperty" doesn't seem to work at all, throwing an error message like Error Type: ImportError Error Value: cannot import name checkValidId Traceback (innermost last): ... File /home/strobl/Zope-2.3.0a1-src/lib/python/OFS/PropertyManager.py, line 247, in _setProperty (Object: testdoc) ImportError: (see above) Indeed, line 247 (and 248) contain a mistake. Changing from ObjectManager import checkValidId checkValidId(self, id) to from ObjectManager import check_valid_id check_valid_id(self, id) fixes the problem. A quick search only finds a single definition/use of check_valid_id aka checkValidId. What do the Zope naming rules say about how such a method has to be named? On 11 Dec 2000, 16:59 Brian Lloyd wrote: http://www.zope.org/Products/Zope/2.3.0a1/ -- o ( [EMAIL PROTECTED] (+49 2241) 14-2394 /\* GMD mbH #include _`\ `_=== Schloss Birlinghoven, std.disclaimer __(_)/_(_)___.-._ 53754 Sankt Augustin, Germany ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Z-Commerce components
Jason wonders: Looking for an e-commerce tool to use for a Zope-based site for artists to share, display and sell 'net art' and more. Also to allow sponsors to do just that. snip 1. What do you recommend for taking credit card purchases online with Zope? The Wampum Generator is available at: http://www.zope.org/Members/ngarcia/WampumGenerator ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Turn Off Rampant Capitalization?
On Thu, 28 Dec 2000 12:44:24 -0500 you wrote: It Seems That Zope Likes To Capitalize Just About Every Word It Gets Hold Of. Is There A Good Way To Turn This Off? I Can Think Of Some Kludges, But I'd Like To Avoid Them. How do you mean? Which of the following is a proper noun or acronym? Zope Contents View Properties Import/Export Security Undo Ownership Find Rename Cut Copy Delete Export Available Objects Add Help Property Name Type Value Digital Creations I should look at the code, but I'm hoping that everything like this is generated by some routine that has a "capitalize" flag turned on. I'd just like to turn it off. Note that I'm mostly whining. I really should look in the code and get a clue, but it'd be great if someone would say something like "Oh, yeah, just set 'capitalize_everything' to 'off'..." (I suspect that'd be right next to the "random apostrophe's" setting.) Can you tell I'm getting bogged down right before a deadline? Thanks. --kyler ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Turn Off Rampant Capitalization?
It Seems That Zope Likes To Capitalize Just About Every Word It Gets Hold Of. Is There A Good Way To Turn This Off? I Can Think Of Some Kludges, But I'd Like To Avoid Them. Thanks. --kyler ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Turn Off Rampant Capitalization?
Hi Kyler, AFAIK, there is no routine which capitalizes the words in management tabs. They just all happen to be capitalized literally. Is this what you mean? - Original Message - From: "Kyler B. Laird" [EMAIL PROTECTED] To: "Chris McDonough" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, December 28, 2000 12:51 PM Subject: Re: [Zope] Turn Off Rampant Capitalization? On Thu, 28 Dec 2000 12:44:24 -0500 you wrote: It Seems That Zope Likes To Capitalize Just About Every Word It Gets Hold Of. Is There A Good Way To Turn This Off? I Can Think Of Some Kludges, But I'd Like To Avoid Them. How do you mean? Which of the following is a proper noun or acronym? Zope Contents View Properties Import/Export Security Undo Ownership Find Rename Cut Copy Delete Export Available Objects Add Help Property Name Type Value Digital Creations I should look at the code, but I'm hoping that everything like this is generated by some routine that has a "capitalize" flag turned on. I'd just like to turn it off. Note that I'm mostly whining. I really should look in the code and get a clue, but it'd be great if someone would say something like "Oh, yeah, just set 'capitalize_everything' to 'off'..." (I suspect that'd be right next to the "random apostrophe's" setting.) Can you tell I'm getting bogged down right before a deadline? Thanks. --kyler ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Turn Off Rampant Capitalization?
On Thu, 28 Dec 2000 13:34:57 -0500 you wrote: AFAIK, there is no routine which capitalizes the words in management tabs. They just all happen to be capitalized literally. Is this what you mean? Yeah, tabs and everywhere else. I was guessing that some routine was responsible because I see things like "id" changed to "Id". I wouldn't expect a human to do that. Oh, well. I wanted to know if there was an obvious answer that I was missing. It wasn't the answer I wanted, but I appreciate it. Thanks. --kyler ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Turn Off Rampant Capitalization?
Kyler, How do you mean? - Original Message - From: "Kyler B. Laird" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 28, 2000 12:21 PM Subject: [Zope] Turn Off Rampant Capitalization? It Seems That Zope Likes To Capitalize Just About Every Word It Gets Hold Of. Is There A Good Way To Turn This Off? I Can Think Of Some Kludges, But I'd Like To Avoid Them. Thanks. --kyler ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
Cees de Groot writes: ... excessive CPU/memory consumption ... If you use Zope 2.2.x, you can try to access the debug tools in the "Control Panel". They will show you, which request is active (to more easily reproduce and analyse the problem) and how the reference counts are changed. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Problem with a calling a stored procedure which returns data (Help!)
Hello, I have a stored procedure in sybase that I would like to run. How do I do this, I can't seem to find it anywhere. The stored procedure is supposed to return several records. I am using the SybaseDAv2. Thanks! Happy Holidays!! :) -jon -Original Message- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to make two racks work under one specialist?
Hi Dirksen.. try this: WITH Deliverables.getItem(self.id) COMPUTE name=((RESULT is _.None) and 'none available') or RESULT.name What are you using as the 'load by accessing attribute' attribute? -steve ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Turn Off Rampant Capitalization?
Kyler said: it'd be great if someone would say something like "Oh, yeah, just set 'capitalize_everything' to 'off'..." i can't tell you where to look, but as for "what" to look for, try searching for: string.capwords( or, in dtml entity syntax: dtml.capitalize- good luck! jerry s. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Z-Commerce components
The Wampum Generator is available at: http://www.zope.org/Members/ngarcia/WampumGenerator Thanks! Do you know is anyone _using_ Wampum : a. For handling real transactions, or is it still in development stages ? b. With Etailer's Zope kit? - Jason ___ Jason CUNLIFFE = NOMADICS['Interactive Art and Technology'] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: Z-Commerce components
Jason asked: Do you know is anyone _using_ Wampum : a. For handling real transactions, or is it still in development stages ? b. With Etailer's Zope kit? This URL will have to be "reconstituted, but check out: http://zope.nipltd.com/public/lists/commerce-archive.nsf/1201f301bbb3337c802 568c100638aed/25a1fec66d4d8c98802568f20063b55d?OpenDocumentHighlight=0,wamp um Not E-Tailer, but E-Market. E-ither way, there may be something useful to you ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Z-Commerce components
Check out: http://www.codeit.com/codeit/964459526/index_html -- Loren -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Cunliffe Sent: Wednesday, December 27, 2000 16:10 To: [EMAIL PROTECTED] Subject: [Zope] Z-Commerce components Hi Looking for an e-commerce tool to use for a Zope-based site for artists to ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Urgent Help, raise CorruptedTransactionError, message
When I try to start zope I get the following error. root@capsprodt1:/home/caps/test/zope$ Traceback (innermost last): File "/home/caps/test/zope/z2.py", line 386, in ? exec "import "+MODULE in {} File "string", line 1, in ? File "/home/caps/test/zope/lib/python/Zope/__init__.py", line 109, in ? DB=ZODB.FileStorage.FileStorage(Globals.BobobaseName) File "/home/caps/test/zope/lib/python/ZODB/FileStorage.py", line 287, in __init__ self._pos, self._oid, tid = read_index( File "/home/caps/test/zope/lib/python/ZODB/FileStorage.py", line 1165, in read_index panic('%s has invalid transaction header at %s', name, pos) File "/home/caps/test/zope/lib/python/ZODB/FileStorage.py", line 214, in panic raise CorruptedTransactionError, message ZODB.FileStorage.CorruptedTransactionError: /home/caps/test/zope/var/Data.fs has invalid transaction header at 31404268 Any ideas Dan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] python scripts to import data into ZODB...
Howdy, I want to import some data into the ZODB and I found this How-To, http://www.zope.org/Members/michel/HowTos/ZODB-How-To, but there are errors in the example code and I haven't been able to get it to work right. Can anyone point to any other information or example code that does something like this? jonathan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
Turning on detailed logging at startup might help too... read about the -M argument in the z2.py script and read my Howto regarding "How To Track Down Hangs" at http://www.zope.org/Members/mcdonc/HowTos/DEBUG-LOG "Cees de Groot" [EMAIL PROTECTED] wrote in message 92ghr3$jf3$[EMAIL PROTECTED]">news:92ghr3$jf3$[EMAIL PROTECTED]... Dieter Maurer [EMAIL PROTECTED] said: Cees de Groot writes: ... excessive CPU/memory consumption ... If you use Zope 2.2.x, you can try to access the debug tools in the "Control Panel". They will show you, which request is active (to more easily reproduce and analyse the problem) and how the reference counts are changed. The problem is, apparently the thing gets in a really tight loop - one threads blocks the rest of Zope, so it is quite hard to use these tools (especially not when the whole thing is not - yet - reproducable, sometimes it happens in an hour, sometimes after 12 hours; a bit hard to keep staring at the screen for 12 hours :-)). As a bit of an act of despair, I'm currently logging Zope's CPU usage every 5 seconds in a log file, hopefully I can match a rise in CPU time with some request in the server logs. -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Urgent Help, raise CorruptedTransactionError, message
Daniel, You may wish to try the fsrecover script (shipped with Zope) or Ty Sarna's "tranalyzer" product to figure out where the bad transaction is and truncate your Data.fs to that point. There is a how-to on Zope.org by Itamar about doing just this at this location: http://www.zope.org/Members/itamar/CorruptedZODB - Original Message - From: "Daniel Rusch" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 28, 2000 4:31 PM Subject: [Zope] Urgent Help, raise CorruptedTransactionError, message When I try to start zope I get the following error. root@capsprodt1:/home/caps/test/zope$ Traceback (innermost last): File "/home/caps/test/zope/z2.py", line 386, in ? exec "import "+MODULE in {} File "string", line 1, in ? File "/home/caps/test/zope/lib/python/Zope/__init__.py", line 109, in ? DB=ZODB.FileStorage.FileStorage(Globals.BobobaseName) File "/home/caps/test/zope/lib/python/ZODB/FileStorage.py", line 287, in __init__ self._pos, self._oid, tid = read_index( File "/home/caps/test/zope/lib/python/ZODB/FileStorage.py", line 1165, in read_index panic('%s has invalid transaction header at %s', name, pos) File "/home/caps/test/zope/lib/python/ZODB/FileStorage.py", line 214, in panic raise CorruptedTransactionError, message ZODB.FileStorage.CorruptedTransactionError: /home/caps/test/zope/var/Data.fs has invalid transaction header at 31404268 Any ideas Dan ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
Dieter Maurer [EMAIL PROTECTED] said: Cees de Groot writes: ... excessive CPU/memory consumption ... If you use Zope 2.2.x, you can try to access the debug tools in the "Control Panel". They will show you, which request is active (to more easily reproduce and analyse the problem) and how the reference counts are changed. The problem is, apparently the thing gets in a really tight loop - one threads blocks the rest of Zope, so it is quite hard to use these tools (especially not when the whole thing is not - yet - reproducable, sometimes it happens in an hour, sometimes after 12 hours; a bit hard to keep staring at the screen for 12 hours :-)). As a bit of an act of despair, I'm currently logging Zope's CPU usage every 5 seconds in a log file, hopefully I can match a rise in CPU time with some request in the server logs. -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Turn Off Rampant Capitalization?
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kyler B. Laird Sent: Thursday, December 28, 2000 12:52 PM To: Chris McDonough Cc: [EMAIL PROTECTED] Subject: Re: [Zope] Turn Off Rampant Capitalization? Which of the following is a proper noun or acronym? Zope Contents View Properties Import/Export Security Undo Ownership Find Rename Cut Copy Delete Export Available Objects Add Help Property Name Type Value Digital Creations Zope and Digital Creations are probably the only two that should be capitalized in any context, but IMO all of the others are correctly capitalized in the context of a tab, since the label of a tab is along the lines of a title, which is correct to capitalize. Also, in a sentence when referring to a label or tab, it would be correct to capitalize. I happen to think it's eaiser to read that way, but I suppose reasonable people might disagree. ___ Ron Bickers Logic Etc, Inc. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Question on __roles__
I have encapsulated most bits of my software in a product. One part simply shows database objects, and I've made a base class to handle most of the showing and editing stuff. In the base class, I keep a tab on what methods etc. are used for viewing and for editing, and I use these in the concrete classes to set the roles. Eg: Base.py: class Obj(OFS.SimpleItem.Item, Acquisition.Implicit, AccessControl.Role.RoleManager, AccessControl.Owned.Owned): view_objects = [] index_html = HTMLFile('default_view', globals()) view_object.append('index_html') ... etcetera Customer.py: class Obj(Base.Obj): __ac_permissions__ = ( ('View Own Info', Base.Obj.view_objects), ) ... Globals.default__class_init__(Obj) As far as I can see, this is all by the book. The whole idea is that the set of methods is the same, but the permissions on them can differ (for example, there are special restrictions on viewing and editing invoices). However, these protections don't work in most cases. They seem to work when they pertain to methods, but they don't when they pertain to DTML files. Is there something in the base class' base classes that influences how role lookup works? I've tried to trace down what happens, and found that ZPublisher.BaseRequest has a funny bit: when trying to find out the necessary roles on an object, it first tries to get the attribute '__roles__' on the subobject, and then combines the current entry name plus '__roles__' and tries to get that from the subobject. However, it seems to me that the latter getattr() needs to be done on the object, not the subobject - at least, my tracing seems to indicate that if it walks down, say 'Customer/53/index_html', that at a certain moment during the traversal object = Customer instance subobject = Python method entry_name = 'index_html' Here, looking up "index_html__roles__" in the subobject, the index_html method, doesn't seem to be very useful - it is expected to be found on the containing Customer instance. And indeed, if I change line 386 in BaseRequest.py from: roles = getattr(subobject, entry_name+'__roles__', roles) to: roles = getattr(object, entry_name+'__roles__', roles) things work as I expect them to work. As this is such a core piece of Zope, it seems quite unlikely to me that I found a bug here (although an older version of ZPublisher does check object instead of subobject). The only thing I can think of is that Acquisition should work for the getattr() and somehow I managed to disable Acquisition on these instances. Any hints as to what I'm doing wrong? -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope eating CPU/RAM - how do I find the culprit?
[EMAIL PROTECTED] said: Turning on detailed logging at startup might help too... read about the -M argument in the z2.py script and read my Howto regarding "How To Track Down Hangs" at http://www.zope.org/Members/mcdonc/HowTos/ DEBUG-LOG Thanks! That looks promising! -- Cees de Groot http://www.cdegroot.com [EMAIL PROTECTED] GnuPG 1024D/E0989E8B 0016 F679 F38D 5946 4ECD 1986 F303 937F E098 9E8B ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] How to change time stamp format of zope's debug information?
In debug mode, the time stamps displayed are in GMT format. How can I change it to my time zone? Dirksen __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to make two racks work under one specialist?
Hi Steve, It works! Thank you. Still there's a couple of things to be cleared. What's the use of 'otherwise' clause? And is it true that the 1st 'with' clause fails, the whole skinscript process fails (so one 'with' clause is all one skinscript can put up with)? Dirksen __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.yahoo.com/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )