Re: [Zope-dev] ZCatalog Key Error question
[EMAIL PROTECTED] wrote at 2006-9-1 13:29 -0400: Traceback for my Key Error (Dieter, thank you for alerting me on where to find this): Traceback (innermost last): ... - 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 This does not look like a catalog corruption. Instead, it looks as if the catalog changed since the search was done. Are you caching your search results? -- 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] ZODB.POSException.ConflictError on attribute assignment
Michael Dunstan wrote at 2006-9-2 10:58 +1200: ... 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.) A minor correction: not concurrent updates to the same attribute but of the same persistent object. -- 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
Dieter Maurer wrote at 2006-9-3 19:22 +0200: [EMAIL PROTECTED] wrote at 2006-9-1 13:29 -0400: Traceback for my Key Error (Dieter, thank you for alerting me on where to find this): Traceback (innermost last): ... - 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 This does not look like a catalog corruption. Instead, it looks as if the catalog changed since the search was done. Are you caching your search results? Sorry! I was wrong! It has nothing to do with a catalog modification after the search. Looks indeed as if an index reported a document which is no longer indexed. Looks like an index bug. Which (types of) indexes are involved in your failing queries? -- 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
Thank you so much for following-up with me, here. I think you're right about this having to do with the indexes on the ZCatalog. The catalog has: 1. Seven FieldIndex indexes. 2. A DateIndex index 3. Three ZCTextIndex indexes I actually create these from python in a function that accepts the catalog as a parameter during the Product Initialization process. I have a function catalog_add that creates and initializes the a ZCatalog when this product is created and initialized, so let me actually post the sourcecode here for that function and the functions it calls. It's fairly short. There are two functions of note catalog_add and addIndexes. I'd actually be grateful if you would take a look and let me know if you see anything. In particular, am I using an index that you know to have problems, or that I'm using improperly. class Newsdesk(Folder,Persistent,Implicit): meta_type = Newsdesk # ... def catalog_add(self): setup the catalog self.manage_addProduct[ZCatalog].manage_addZCatalog(Catalog, Default Catalog) catalog = self._getOb('Catalog') self.addLexicon(catalog) self.addIndexes(catalog) self.addMetas(catalog) catalog = self._getOb('Catalog') return catalog def addIndexes(self, cat): cat.addIndex('date_found', 'FieldIndex', 'date_found') cat.addIndex('deleted_p', 'FieldIndex', 'deleted_p') cat.addIndex('uri', 'FieldIndex', 'uri') cat.addIndex('categories_field', 'FieldIndex', 'categories') cat.addIndex('categorized_p', 'FieldIndex', 'categorized_p') cat.addIndex('approved_p', 'FieldIndex', 'approved_p') cat.addIndex('search_id', 'FieldIndex', 'search_id') extras = Empty() extras.doc_attr = 'title' extras.index_type = 'Okapi BM25 Rank' extras.lexicon_id = 'Lexicon' cat.addIndex('title', 'ZCTextIndex', extras) extras2 = Empty() extras2.doc_attr = 'source_name' extras2.index_type = 'Okapi BM25 Rank' extras2.lexicon_id = 'Lexicon' cat.addIndex('source_name', 'ZCTextIndex', extras2) extras3 = Empty() extras3.doc_attr = 'categories' extras3.index_type = 'Okapi BM25 Rank' extras3.lexicon_id = 'Lexicon' cat.addIndex('categories', 'ZCTextIndex', extras3) cat.addIndex('bobobase_modification_time', 'DateIndex') def addMetas(self, cat): create the metadata columns cat.manage_addColumn(categorized_p) cat.manage_addColumn(deleted_p) cat.manage_addColumn(search_id) cat.manage_addColumn(categories) cat.manage_addColumn(date_found) cat.manage_addColumn(source_name) cat.manage_addColumn(title) cat.manage_addColumn(uri) def addLexicon(self, cat): elem = [] wordSplitter = Empty() wordSplitter.group = 'Word Splitter' wordSplitter.name = 'HTML aware splitter' caseNormalizer = Empty() caseNormalizer.group = 'Case Normalizer' caseNormalizer.name = 'Case Normalizer' stopWords = Empty() stopWords.group = 'Stop Words' stopWords.name = 'Remove listed and single char words' elem.append(wordSplitter) elem.append(caseNormalizer) elem.append(stopWords) cat.manage_addProduct['ZCTextIndex'].manage_addLexicon('Lexicon', 'Default Lexicon', elem) On Sun, 3 Sep 2006 20:11:33 +0200, Dieter Maurer [EMAIL PROTECTED] said: Dieter Maurer wrote at 2006-9-3 19:22 +0200: [EMAIL PROTECTED] wrote at 2006-9-1 13:29 -0400: Traceback for my Key Error (Dieter, thank you for alerting me on where to find this): Traceback (innermost last): ... - 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 This does not look like a catalog corruption. Instead, it looks as if the catalog changed since the search was done. Are you caching your search results? Sorry! I was wrong! It has nothing to do with a catalog modification after the search. Looks indeed as if an index reported a document which is no longer indexed. Looks like an index bug. Which
Re: [ZWeb] Re: website design discussion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2 Sep 2006, at 14:38, Tom Von Lahndorff wrote: http://www.modscape.com/zope Please let me know of any bugs and what your browsers/os setup is. Works without any visible flaws under Safari and OmniWeb and looks very nice, clear and simple. Perfect for a site that is mostly static such as the foundation site. If it were up to me I'd stop any further niggling unless there are serious problems with popular browsers and just run with the dang thing. I fully agree with Tom's previous point that every time we have some kind of new design for site X discussion it's all going round in circles and then just dies off. jens -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (Darwin) iD8DBQFE+sCeRAx5nvEhZLIRAh43AJ99ue7JQBW4wZylFahTiBShn2jY+QCfSYpI Yk015jACz8ux+fGH0UgHV7w= =JC69 -END PGP SIGNATURE- ___ Zope-web maillist - Zope-web@zope.org http://mail.zope.org/mailman/listinfo/zope-web
[Zope] Can't stop Zope, machine hanging
Hi all, My Zope is stuck like never before. With my server on another continent, 8 hours time difference, and on a Sunday, I am pulling out my few remaining hairs... Our box runs FreeBSD 5, Zope 2.78 (if I remember correctly) and Squid. The ISP has been preparing for a move and shifted some machines, pulled some wires, and I see that the machine has rebooted. I can't restart or stop Zope - '/usr/local/www/Zope/zope01/bin/zopectl stop' just produces '' for a long time - should I wait? I was unable to kill one of the python2.3 processes, and can't even reboot the machine, using 'shutdown -r now', as I have done previously in extremis. Any ideas? Not strictly a Zope question, but I would appreciate any help. Thanks. Ken __ 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] Can't stop Zope, machine hanging
--On 2. September 2006 23:43:50 -0700 Ken Ara [EMAIL PROTECTED] wrote: Hi all, My Zope is stuck like never before. With my server on another continent, 8 hours time difference, and on a Sunday, I am pulling out my few remaining hairs... Our box runs FreeBSD 5, Zope 2.78 (if I remember correctly) and Squid. The ISP has been preparing for a move and shifted some machines, pulled some wires, and I see that the machine has rebooted. I can't restart or stop Zope - '/usr/local/www/Zope/zope01/bin/zopectl stop' just produces '' for a long time - should I wait? Use netstat -anp to figure out if there is any process listening to *your* Zope port (port should be in state LISTEN). If yes, the -p option should give you the process id. Try to kill the process (if you have the permissions). If you don't have the permissions, ask your administrator. If there is no process running, try zopectl fg...this should give you more detailed error messages on the console. -aj pgp8Dk3pTsU0T.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] Can't stop Zope, machine hanging
--On 3. September 2006 01:18:55 -0700 Ken Ara [EMAIL PROTECTED] wrote: Thanks Andreas, I am logged in as root user. Here is the result of 'top': top is *not* the right tool to check for processes. Use ps!!! I was able to kill one of the Zope processes but not pid 945. Maybe it wasn't a good idea, but even 'kill -s HUP 945' had no effect. You still have the power of kill -TERM and kill -KILL. ZConfig.ConfigurationError: There was a problem starting a server of type HTTPServer. This may mean that your user does not have permission to bind to the port which the server is trying to use or the port may already be in use by another application. (Address already in use) Same exact error trying to restart Zope with bin/runzope As I mentioned, I can't even reboot the machine, the shutdown command can't kill this process either. I answered to use netstat for finding out the related process. Please follow that advice *first* and then ask again. -aj pgpCImFF3hIkZ.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] Can't stop Zope, machine hanging
Actually, I need to read up on the netstat command. Have a look: geneva# netstat -anp netstat: option requires an argument -- p usage: netstat [-AaLnSW] [-f protocol_family | -p protocol] [-M core] [-N system] netstat -i | -I interface [-abdnt] [-f address_family] [-M core] [-N system] netstat -w wait [-I interface] [-d] [-M core] [-N system] netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core] netstat -i | -I interface -s [-f protocol_family | -p protocol] [-M core] [-N system] netstat -m [-c] [-M core] [-N system] netstat -r [-AenW] [-f address_family] [-M core] [-N system] netstat -rs [-s] [-M core] [-N system] netstat -g [-W] [-f address_family] [-M core] [-N system] netstat -gs [-s] [-f address_family] [-M core] [-N system] And, I guess it time for me to learn to kill... --- Andreas Jung [EMAIL PROTECTED] wrote: --On 3. September 2006 01:18:55 -0700 Ken Ara [EMAIL PROTECTED] wrote: Thanks Andreas, I am logged in as root user. Here is the result of 'top': top is *not* the right tool to check for processes. Use ps!!! I was able to kill one of the Zope processes but not pid 945. Maybe it wasn't a good idea, but even 'kill -s HUP 945' had no effect. You still have the power of kill -TERM and kill -KILL. ZConfig.ConfigurationError: There was a problem starting a server of type HTTPServer. This may mean that your user does not have permission to bind to the port which the server is trying to use or the port may already be in use by another application. (Address already in use) Same exact error trying to restart Zope with bin/runzope As I mentioned, I can't even reboot the machine, the shutdown command can't kill this process either. I answered to use netstat for finding out the related process. Please follow that advice *first* and then ask again. -aj __ 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] Can't stop Zope, machine hanging
--On 3. September 2006 01:56:44 -0700 Ken Ara [EMAIL PROTECTED] wrote: Actually, I need to read up on the netstat command. Have a look: geneva# netstat -anp netstat: option requires an argument -- p Please read the man page for netstat (man netstat). Nobody has all options for all programs on every possible operating system in the head). -aj pgp8opPB80TST.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 )
[Zope] Python import security problem
Hi, (As you know) I'm a zope newbie. I didn't find a article describing my following problem. I can not import python objects like 'time'. If I use import time I'll become the error message You are not allowed to access 'time' in this context Is it not possible to do this Thank you very much 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] Python import security problem
--On 3. September 2006 07:13:33 -0700 Ferhat Ayaz [EMAIL PROTECTED] wrote: Hi, (As you know) I'm a zope newbie. I didn't find a article describing my following problem. I can not import python objects like 'time'. If I use import time I'll become the error message You are not allowed to access 'time' in this context - lib/python/Products/PythonScripts/README.txt -aj pgpkoRz2Q6EtV.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] iterating dictionaries with dtml-in
Ferhat Ayaz wrote at 2006-9-2 04:40 -0700: ... I want to do this with DTML. select dtml-in getDicts option HOW CAN I PUT the keys 'name' HERE /option /dtml-in /select (getDicts returns the above list of dictionaries) You probably need the mapping attribute of dtml-in -- and maybe some background reading (you should read the documentation (Zope Book 2.7 edition, online on plope.org). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] SecurityInfo Conflicting security declarations
beno wrote at 2006-9-2 12:48 -0400: Hi; I noticed in my events log the following: 2006-09-02T15:13:50 PROBLEM(100) SecurityInfo Conflicting security declarations for getViewTOCValue -- 2006-09-02T15:13:50 PROBLEM(100) SecurityInfo Class PloneArticleMultiPage had conflicting security declarations How do I trouble-shoot these? The easiest way is to ignore them. Unless you observe security problems, you need not to worry about them. A problem can only occur for objects that store the allowed roles in themselves (in the __roles__) attribute (such as e.g. DTML object, Page Templates, External Methods and other Zope site building objects). For these objects, the security machinery does not know which allowed roles to store in the object. (True) methods have the allowed roles stored in their instance objects and there should not be a problem, although I am not sure that the code already knows this... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Can't stop Zope, machine hanging
Ken Ara wrote at 2006-9-2 23:43 -0700: ... I can't restart or stop Zope - '/usr/local/www/Zope/zope01/bin/zopectl stop' just produces '' for a long time - should I wait? I was unable to kill one of the python2.3 processes, and can't even reboot the machine, using 'shutdown -r now', as I have done previously in extremis. This indicates a severe problem with your operating system (or maybe your computer). There are situations where a press on the reset button is necessary. Looks like you are in such a situation... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Python import security problem
Ferhat Ayaz wrote at 2006-9-3 07:13 -0700: ... I can not import python objects like 'time'. If I use import time I'll become the error message You are not allowed to access 'time' in this context Is it not possible to do this Please read the Zope Book (2.7 edition, online on plope.org). You will learn there the difference between trusted and untrusted code. Untrusted code (like Script (Python) and FSPythonScript) can import only a very small set of modules. As you observe, they cannot import time. Reading the README in Products/PythonScripts will tell you how to allow the import of additional modules. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] iterating dictionaries with dtml-in
Dieter Maurer wrote: Ferhat Ayaz wrote at 2006-9-2 04:40 -0700: ... I want to do this with DTML. select dtml-in getDicts option HOW CAN I PUT the keys 'name' HERE /option /dtml-in /select (getDicts returns the above list of dictionaries) You probably need the "mapping" attribute of "dtml-in" -- and maybe some background reading (you should read the documentation (Zope Book 2.7 edition, online on plope.org). Ferhat, If you are new to Zope do yourself a favor and forget about DTML. Yeah its fun and (seemingly) easy to learn. But I argue for Page Templates + python. Python is so much clearer than dtml - and Page Templates + python *is* the favored zope paradigm. But if you insist - Casey Duncan wrote a nice product (dtml-eval) and an interesting discussion about DTML and what to watch out for ... http://www.zope.org/Members/Kaivo/EvalTag_HowTo ___ 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] TinyTablesPlus How To??
Hi; I've installed TinyTablesPlus, but how do I use it? I can't find any documentation! TIA, beno ___ 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] iterating dictionaries with dtml-in
Thank you for your suggestion. Indeed, I noticed that page templates are great. I can code my websites now fastern then with any other alternative. I'm also using Dreamweaver to design the pages. It's just great and its working without problems. Accessing dictionaries are nativly supported by page templates. I'm reading the zope book 2.7 (plope.org) now. I read the 2.7 before. Greets, Ferhat --- David H [EMAIL PROTECTED] wrote: Dieter Maurer wrote: Ferhat Ayaz wrote at 2006-9-2 04:40 -0700: ... I want to do this with DTML. select dtml-in getDicts option HOW CAN I PUT the keys 'name' HERE /option /dtml-in /select (getDicts returns the above list of dictionaries) You probably need the mapping attribute of dtml-in -- and maybe some background reading (you should read the documentation (Zope Book 2.7 edition, online on plope.org). Ferhat, If you are new to Zope do yourself a favor and forget about DTML. Yeah its fun and (seemingly) easy to learn. But I argue for Page Templates + python. Python is so much clearer than dtml - and Page Templates + python *is* the favored zope paradigm. But if you insist - Casey Duncan wrote a nice product (dtml-eval) and an interesting discussion about DTML and what to watch out for ... http://www.zope.org/Members/Kaivo/EvalTag_HowTo __ 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] TinyTablesPlus How To??
Let me add in my 2cents worth. Unless you really need TinyTablesPlus for some product that requires it, you are better off using a relational database like MySQL. On Mon, 4 Sep 2006, Andreas Jung wrote: --On 3. September 2006 17:12:04 -0400 beno [EMAIL PROTECTED] wrote: Hi; I've installed TinyTablesPlus, but how do I use it? I can't find any documentation! Beno, do yourself and us a favor: open your eyes before posting. TinyTablesPlus contains a 250 line long README.txt which explains the usage of the product. -aj -- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )