Re: [Zope-dev] ZCatalog bug in 2.3.1b2

2001-03-20 Thread Chris McDonough

I cannot reproduce this, Andy, although I'm sure something is up.  If it
continues to fail under b3, can you possibly send me a Data.fs that exhibits
the problem?

Sorry,

- C

- Original Message -
From: "Andy Dawkins" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 11:02 AM
Subject: [Zope-dev] ZCatalog bug in 2.3.1b2


 I posted this before but didn't get a reply.

 Has any one seen this bug, Or do they know a fix?

 ATM this is stopping me using 2.3.1b2 which is a bad thing(tm)

 ---
 Zope Errorr

 Zope has encountered an error while publishing this resource.

 Error Type: TypeError
 Error Value: len() of unsized object

 With this traceback:
 Traceback (innermost last):
   File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
 line 223, in publish_module
   File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
 line 187, in publish
   File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Zope/__init__.py,
 line 221, in zpublisher_exception_hook
 (Object: Traversable)
   File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
 line 171, in publish
   File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/mapply.py,
 line
 160, in mapply
 (Object: executeSearch)
   File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/ZPublisher/Publish.py,
 line 112, in call_object
 (Object: executeSearch)
   File
 /usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/OFS/DTMLMethod.py,
 line 189, in __call__
 (Object: executeSearch)
   File

/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_String
.py,
 line 538, in __call__
 (Object: executeSearch)
   File

/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Let.py
,

 line 146, in render
 (Object: Results="Catalog(REQUEST=REQUEST)")
   File

/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/DocumentTemplate/DT_Util.p
y,
 line 334, in eval
 (Object: Catalog(REQUEST=REQUEST))
 (Info: REQUEST)
   File string, line 0, in ?
   File

/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/ZCatalog
.py,
 line 530, in searchResults
 (Object: Traversable)
   File


/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.
py,
 line 654, in searchResults
   File

/usr/local/src/Zope-2.3.1b2-linux2-x86/lib/python/Products/ZCatalog/Catalog.
py,
 line 591, in _indexedSearch
 TypeError: (see above)
 

 Here is the line which calls the search:

 sr = self.searchResults({'Type' : type, 'sort_on':'lowercase_title_'})

 fyi. type = 'TypeTest'

 The indexes are as follows:
 Status = Text Index
 Type = Field Index
 Identifier = Field Index
 lowercase_title_ = Field Index
 parent_identifiers_ = Keyword Index

 The meta types are like this:
 Title
 id
 identifier

 There are only 13 records in the catalog.
 And there are some results to be returned.

 Cheers
 -Andy

 ___
 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-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] ZCatalog Bug?

2001-03-16 Thread Toby Dickenson

On Fri, 16 Mar 2001 08:48:09 -0500, Edmund Goppelt
[EMAIL PROTECTED] wrote:

Could the author have meant to write 'Exception' here instead of 'Except'?

I am running Zope 2.3.0 stable.  

The current cvs has this changed to 'except AttributeError'


Toby Dickenson
[EMAIL PROTECTED]

___
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] ZCatalog Bug Fix II

2001-01-28 Thread Chris Withers

 Chris Withers wrote:
 
  Okay, tracked down what's happening, can't understand why :-(

Now I can... convoluted but with a simple answer ;-)

 As to why the object is on the top of the namespace, I dunno whether it's
 dtml-in or ZCatalog that's responsible...

The reason for this, was because the object was being acquired. The naming
similarity was pure chance. I had an index called TestCase in the catalog,
the same name as the DTML method for the form. I _didn't_ have a column
called TestCase in the ZCatalog MetaData, so when the result-displaying DTML
method tried to dtml-var it, it was acquired, and hence the method was
plopped on top of the namespace.

The actual problem is that ZCatalog was using the indexes instead of the
metadata when telling Z Search was results form to build. The following
patch solves that, I'm sure I put it in the collector when I moved Squishdot
to use ZCatalog too :-S

cheers,

Chris

--- zcatalog.py.old2 Sun Jan 28 20:56:06 2001
+++ zcatalog.py Sun Jan 28 21:00:09 2001
@@ -486,7 +486,7 @@

 def _searchable_result_columns(self):
 r = []
-for name in self._catalog.indexes.keys():
+for name in self._catalog.schema.keys():
 i = {}
 i['name'] = name
 i['type'] = 's'

PS: I won't bother with the collector on this one, since both relevent
people are already being CC'ed ;-)


___
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 )