Quick question, I built a ZClass that should create a Content Folder object, but when I try to add one it gives me this error: Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: has_key I looked for this attribute in all of the DTML methods, python scripts, etc. that are involved in creating the Content Folder and couldn't find it anywhere. Thanks, Jamie --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.481 / Virus Database: 277 - Release Date: 5/13/2003
Jamie wrote at 2003-5-23 19:06 -0400:
Quick question, I built a ZClass that should create a Content Folder object, but when I try to add one it gives me this error:
Zope Error
Zope has encountered an error while publishing this resource.
Error Type: AttributeError Error Value: has_key
I looked for this attribute in all of the DTML methods, python scripts, etc. that are involved in creating the Content Folder and couldn't find it anywhere.
Tracebacks are incredibly helpful. Look at them! In Zope 2.6, you find them in an object called "error_log" (in your Zope root folder). In earlier Zope version, you see the traceback in the HTML source or your error page. Dieter
Here is the traceback, I still don't know what the problem is. Traceback (innermost last): File C:\PROGRA~1\SANDBOX\lib\python\ZPublisher\Publish.py, line 150, in publish_module File C:\PROGRA~1\SANDBOX\lib\python\ZPublisher\Publish.py, line 114, in publish File C:\PROGRA~1\SANDBOX\lib\python\Zope\__init__.py, line 158, in zpublisher_exception_hook (Object: contentFolder_factory) File C:\PROGRA~1\SANDBOX\lib\python\ZPublisher\Publish.py, line 98, in publish File C:\PROGRA~1\SANDBOX\lib\python\ZPublisher\mapply.py, line 88, in mapply (Object: index_html) File C:\PROGRA~1\SANDBOX\lib\python\ZPublisher\Publish.py, line 39, in call_object (Object: index_html) File C:\PROGRA~1\SANDBOX\lib\python\App\Factory.py, line 106, in index_html (Object: contentFolder_factory) File C:\PROGRA~1\SANDBOX\lib\python\HelpSys\HelpSys.py, line 287, in __call__ (Object: Help) File C:\PROGRA~1\SANDBOX\lib\python\Products\ZCatalog\ZCatalog.py, line 579, in searchResults (Object: catalog) File C:\PROGRA~1\SANDBOX\lib\python\Products\ZCatalog\Catalog.py, line 554, in searchResults AttributeError: (see above) -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org] On Behalf Of Dieter Maurer Sent: Saturday, May 24, 2003 4:07 PM To: Jamie Cc: zope@zope.org Subject: Re: [Zope] Attribute Error: has_key Jamie wrote at 2003-5-23 19:06 -0400:
Quick question, I built a ZClass that should create a Content Folder object, but when I try to add one it gives me this error:
Zope Error
Zope has encountered an error while publishing this resource.
Error Type: AttributeError Error Value: has_key
I looked for this attribute in all of the DTML methods, python scripts, etc. that are involved in creating the Content Folder and couldn't find it anywhere.
Tracebacks are incredibly helpful. Look at them! In Zope 2.6, you find them in an object called "error_log" (in your Zope root folder). In earlier Zope version, you see the traceback in the HTML source or your error page. 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 ) --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.481 / Virus Database: 277 - Release Date: 5/13/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.481 / Virus Database: 277 - Release Date: 5/13/2003
Jamie White wrote at 2003-5-25 14:47 -0400:
Here is the traceback, I still don't know what the problem is.
When you have a traceback, you investigate its last lines...
.... File C:\PROGRA~1\SANDBOX\lib\python\Products\ZCatalog\ZCatalog.py, line 579, in searchResults (Object: catalog) File C:\PROGRA~1\SANDBOX\lib\python\Products\ZCatalog\Catalog.py, line 554, in searchResults AttributeError: (see above)
They tell you were the problems has been detected. In your case, line "554" of "...Products\ZCatalog\Catalog.py" contains a "has_key" attribute lookup for an object that does not have such an attribute. Check what this object is and why it does not have a "has_key". I cannot do this for you, as we have quite different Zope versions installed (your's seems to be quite old). Dieter
participants (3)
-
Dieter Maurer -
Jamie -
Jamie White