Attribute error : redirect encounter with build simple Zclass
Hi, I was facing this error when using How to "Build a simple ZClass. Error Type: AttributeError Error Value: redirect Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. Traceback (innermost last): File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 223, in publish_module File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\Program Files\WebSite\lib\python\Zope\__init__.py, line 226, in zpublisher_exception_hook (Object: RoleManager) File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\Program Files\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: tbContainer_add) File C:\Program Files\WebSite\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: tbContainer_add) File C:\Program Files\WebSite\lib\python\OFS\DTMLMethod.py, line 194, in __call__ (Object: tbContainer_add) File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_String.py, line 544, in __call__ (Object: tbContainer_add) File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_With.py, line 148, in render (Object: tbContainer.createInObjectManager(REQUEST['id'], REQUEST)) File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_With.py, line 148, in render (Object: tbCatalog) File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 230, in eval (Object: manage_addIndex('username','FieldIndex',REQUEST,RESPONSE,URL1)) (Info: manage_addIndex) File <string>, line 2, in f File C:\Program Files\WebSite\lib\python\Products\ZCatalog\ZCatalog.py, line 414, in manage_addIndex (Object: LockableItem) AttributeError: (see above) Pls assist. Thanks. ===== Hamzat kamaldeen Ishola Dnet Systems Limited. 223 Ikorodu Road, Lagos. Nigeria. 234 1 7749381, 234 08033011305 --- Making Mistake is not a problem but readiness to admit it. Sentimental decisions are not mistakes but failures !!! Mistake is an opportunity to see better !!! __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
Hamzat Kamal writes:
I was facing this error when using How to "Build a simple ZClass.
Error Type: AttributeError Error Value: redirect ... (Object: tbCatalog) File C:\Program Files\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 230, in eval (Object: manage_addIndex('username','FieldIndex',REQUEST,RESPONSE,URL1)) (Info: manage_addIndex) File <string>, line 2, in f File C:\Program Files\WebSite\lib\python\Products\ZCatalog\ZCatalog.py, line 414, in manage_addIndex (Object: LockableItem) AttributeError: (see above) It's a bit strange that "bilding a ZClass" adds an index to a catalog.
Anyway, it appears as if the passed in "RESPONSE" is not a true response object but lacks a "redirect". Check where it comes from. Dieter
On Saturday 27 July 2002 00:56, Hamzat Kamal wrote:
Hi,
I was facing this error when using How to "Build a simple ZClass.
well, you dont need to include REQUEST,RESPONSE,URL1. try without manage_addIndex('username','FieldIndex') i'll update the howto
(Object: manage_addIndex('username','FieldIndex',REQUEST,RESPONSE,URL1)) (Info: manage_addIndex) File <string>, line 2, in f File C:\Program Files\WebSite\lib\python\Products\ZCatalog\ZCatalog.py, line 414, in manage_addIndex (Object: LockableItem) AttributeError: (see above)
Pls assist.
Thanks.
===== Hamzat kamaldeen Ishola Dnet Systems Limited. 223 Ikorodu Road, Lagos. Nigeria. 234 1 7749381, 234 08033011305 --- Making Mistake is not a problem but readiness to admit it. Sentimental decisions are not mistakes but failures !!! Mistake is an opportunity to see better !!!
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org 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 )
-- http://www.kedai.com.my/ http://www.kedai.com.my/eZine http://www.zope.org/Members/kedai http://www.my-zope.org Am I Evil?
On Saturday 27 July 2002 00:56, Hamzat Kamal wrote:
Hi,
I was facing this error when using How to "Build a simple ZClass.
well, you dont need to include REQUEST,RESPONSE,URL1. try without manage_addIndex('username','FieldIndex')
i'll update the howto
Yeap, The error is off. And i assume it should be working fine. Then this is my really problem. I have a site which uses server date to iterate over the folders and display the teasers / links which matches with the server date. I have reviewed the codes several times bcos my host always complain that the iteration been performed on the server when the traffic is high bring down the site. <dtml-call "REQUEST.set('mm', ZopeTime().toZone('GMT+1').strftime('%d%m%y'))"> <dtml-in "news.objectValues(['Folder'])"> <dtml-let number=sequence-number path=id> <dtml-if expr="number < _.int(num)"> <dtml-try> <dtml-with "_.getitem(mm,0)"> <font face=arial size=-5> <dtml-var expr="_.getitem(mm,1)[0:400]">... <br> <a href="&dtml-ngrHome;news/&dtml-path;"> <img src="images/morex.gif" border="0" width="60" height="23"> </a><br> <dtml-if expr="number < _.int(num)-1"> <hr size="2" width="75%"> </dtml-if> </font> </dtml-with> <dtml-except> </dtml-try> </dtml-if> </dtml-let> </dtml-in> Now alot of people have suggested I should use Catalog for the searching. I considered the advise but finding it tough to do exactly what the above code is doing for me. Now, how can I be able to use the ZClass above to achieve my aim. I will appreciate any support you can avoid to render. Thanks in anticipation. ===== Hamzat kamaldeen Ishola Dnet Systems Limited. 223 Ikorodu Road, Lagos. Nigeria. 234 1 7749381, 234 08033011305 --- Making Mistake is not a problem but readiness to admit it. Sentimental decisions are not mistakes but failures !!! Mistake is an opportunity to see better !!! __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
participants (3)
-
Bakhtiar A Hamid -
Dieter Maurer -
Hamzat Kamal