Re: [Zope] AttributeError: Can't Pin It Down!
[EMAIL PROTECTED] wrote at 2007-7-23 08:47 -0400: ... Nothing in the error log about that :( Almost not to believe... Unless, it comes from an exception ignored by the error_log object. ... Module Products.PageTemplates.TALES, line 221, in evaluate URL: /example.com/eng/test Line 7, Column 0 Expression: PythonExpr request.contact_us_form.header() ... Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ __traceback_info__: request.contact_us_form.header() Module Python expression request.contact_us_form.header(), line 1, in expression Module ZPublisher.HTTPRequest, line 1223, in __getattr__ You did it almost right. You forgot to include the Error Type and Error Value information. Exception Type AttributeError Exception Value header This exception information seems not to correspond to the traceback you have posted. If you look carefully at your traceback, then you see that the exception comes from a request.contact_us_form.header() expression which then calls the __getattr__ of an HTTPRequest instance (which almost surely is request) -- and this __getattr__ raises an AttributeError. I do not see any reason why contact_us_form should call request's __getattr__. Thus, I expect that the AttributeError really comes from the request.contact_us_form access. If you are sure that you see Exception Value: header, then the contact_us_form really behaves extremely strange ... Well, frankly, I built this site a long time ago before PTs were in vogue and it worked just fine using DTML. I changed it to PT for you to throw and capture this error ;) Then, your translation to PT went probably wrong. Are you sure that you access your forms via request (which would be REQUEST in DTML). -- 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] AttributeError: Can't Pin It Down!
-Original Message- From: Dieter Maurer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: zope@zope.org Sent: Sun, 22 Jul 2007 1:51 pm Subject: Re: [Zope] AttributeError: Can't Pin It Down! [EMAIL PROTECTED] wrote at 2007-7-21 14:27 -0400: ... Error Type: AttributeError Error Value: masterMarketItems This error shows on a page but not in the error log!! Maybe, it comes from your error page (i.e. standard_error_message). Then, you should see the entry in the error log that caused the error in the first place. Nothing in the error log about that :( ... Module Products.PageTemplates.TALES, line 221, in evaluate URL: /example.com/eng/test Line 7, Column 0 Expression: PythonExpr request.contact_us_form.header() ... Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ __traceback_info__: request.contact_us_form.header() Module Python expression request.contact_us_form.header(), line 1, in expression Module ZPublisher.HTTPRequest, line 1223, in __getattr__ You did it almost right. You forgot to include the Error Type and Error Value information. Exception Type AttributeError Exception Value header But, from what you have included, I guess that request does not have a contact_us_form attribute. Can you explain? I have a Formulator form called contact_us_form and it's in the same folder, so there's no problem with inheritance. I am unfamiliar with Formulator -- but it seems strange to me that you expect request to contain complete forms. Well, frankly, I built this site a long time ago before PTs were in vogue and it worked just fine using DTML. I changed it to PT for you to throw and capture this error ;) Since this is happening with all applications and they worked just fine before I took the *zexp snapshots and loaded them into the new server, I was thinking this must come from something below the application level; namely, from a built of Zope itself. I thought maybe I built this from a FBSD port, but no, it's Z 2.7.8 and I built it from source thus: tar zxvf Zope-2.7.8-final.tgz cd Zope-2.7.8-final ./configure --with-python=/usr/local/bin/python2.3 --prefix=/usr/local/zope/278 make make install /usr/local/zope/278/bin/mkzopeinstance.py Directory: /usr/local/zope/instance1 cd /usr/local/zope/instance1 vi etc/zope.conf effective-user tony chown tony var/ chown tony etc/ chown tony etc/* chown tony log/ chown tony log/* This is fine, though, right? Also, I went to zope to find a copy of this tarball and couldn't! Every other tarball is on the list but 2.7.8!! http://www.zope.org/Products/Zope/swpackage_releases What's up with that?? TIA, Tony AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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] AttributeError: Can't Pin It Down!
[EMAIL PROTECTED] wrote at 2007-7-21 14:27 -0400: ... Error Type: AttributeError Error Value: masterMarketItems This error shows on a page but not in the error log!! Maybe, it comes from your error page (i.e. standard_error_message). Then, you should see the entry in the error log that caused the error in the first place. ... Module Products.PageTemplates.TALES, line 221, in evaluate URL: /example.com/eng/test Line 7, Column 0 Expression: PythonExpr request.contact_us_form.header() ... Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ __traceback_info__: request.contact_us_form.header() Module Python expression request.contact_us_form.header(), line 1, in expression Module ZPublisher.HTTPRequest, line 1223, in __getattr__ You did it almost right. You forgot to include the Error Type and Error Value information. But, from what you have included, I guess that request does not have a contact_us_form attribute. I am unfamiliar with Formulator -- but it seems strange to me that you expect request to contain complete forms. -- 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] AttributeError: Can't Pin It Down!
Okay, I can give you an example from a PT. It will follow. However... 1) All of these sites were working just fine when I made backups of them, which backups I installed on my new server I built. 2) I didn't edit anything. I just built and un-zexp'd (imported) everything. So...wouldn't it seem reasonable to conclude that there is a problem OTHER than the ones I'm posting which is causing SEVERAL AttributeErrors to be thrown from completely different sites? I would have to say it coudn't possibly be otherwise, myself. Everything else in Zope seems to be working fine. Built on FBSD 5.5 with Z 2.7.8 on Py 2.3.5 Below follows error info concerning another site with PT and a shop that says throws an AttributeError concerning masterMarketItems. But, not only does that attr. exist, but I can surf to the shopkeeper's side of things and see the products, utilizing that very attr! Error Type: AttributeError Error Value: masterMarketItems This error shows on a page but not in the error log!! Below follows that which you requested, which I hope I have done correctly. I built the page only to throw the error. Again, contact_us_form does exist as a Formmailer object, and it lives in the very same folder. TIA, Tony Module ZPublisher.Publish, line 175, in publish_module_standard Module Products.PlacelessTranslationService.PatchStringIO, line 34, in new_publish Module ZPublisher.Publish, line 132, in publish Module Zope.App.startup, line 204, in zpublisher_exception_hook Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 222, in _exec Module Products.PageTemplates.PageTemplate, line 96, in pt_render ZopePageTemplate at /example.com/eng/test Module TAL.TALInterpreter, line 190, in __call__ Module TAL.TALInterpreter, line 234, in interpret Module TAL.TALInterpreter, line 460, in do_setLocal_tal Module Products.PageTemplates.TALES, line 221, in evaluate URL: /example.com/eng/test Line 7, Column 0 Expression: PythonExpr request.contact_us_form.header() Names: {'container': Folder instance at e967c50, 'context': Folder instance at e967c50, 'default': Products.PageTemplates.TALES.Default instance at 0x89fbdac, 'here': Folder instance at e967c50, 'loop': SafeMapping instance at ac0f0f0, 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x8a07d6c, 'nothing': None, 'options': {'args': ()}, 'repeat': SafeMapping instance at ac0f0f0, 'request': HTTPRequest, URL=http://203.223.152.46:8080/example.com/eng/test, 'root': Application instance at e86af50, 'template': ZopePageTemplate at /example.com/eng/test, 'traverse_subpath': [], 'user': beno} Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ __traceback_info__: request.contact_us_form.header() Module Python expression request.contact_us_form.header(), line 1, in expression Module ZPublisher.HTTPRequest, line 1223, in __getattr__ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.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 )