How to get nice traceback like from old versions?
Hi all, with Zope version 2.5.1 I was get nice error messages from source of page. With 2.9.4 I was get error messages in file log/events.log which is better for security reasons, but these messages are not as exact as from old zope which give me point to failure like that: ... <strong>Error Type: NameError</strong><br> <strong>Error Value: global name 'Mailinf' is not defined</strong><br> ... <!-- Traceback (innermost last): File /var/zope/lib/python/ZPublisher/Publish.py, line 150, in publish_module File /var/zope/lib/python/ZPublisher/Publish.py, line 114, in publish File /var/zope/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook (Object: helpdesk) File /var/zope/lib/python/ZPublisher/Publish.py, line 98, in publish File /var/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: job_define_.htm) File /var/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object (Object: job_define_.htm) File /var/zope/lib/python/OFS/DTMLDocument.py, line 127, in __call__ (Object: job_define_.htm) File /var/zope/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__ (Object: job_define_.htm) File /var/zope/lib/python/OFS/DTMLDocument.py, line 120, in __call__ (Object: job_define.htm) File /var/zope/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__ (Object: job_define.htm) File /var/zope/lib/python/OFS/DTMLDocument.py, line 120, in __call__ (Object: job_define_zapis) File /var/zope/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__ (Object: job_define_zapis) File /var/zope/lib/python/DocumentTemplate/DT_Util.py, line 159, in eval (Object: REQUEST.set('Mailinf', Mailinf_VZ + email_delim + Mailinf_MZ + email_delim + Mailinf_GZ + email_delim + Mailinf_Zadavatel + email_delim + Mailinf_Kontakt + email_delim + Mailinf)) (Info: email_delim) File <string>, line 2, in f NameError: (see above) --> Many thanks, JL.
--On 5. Februar 2008 11:35:09 +0100 Jaroslav Lukesh <lukesh@seznam.cz> wrote:
Hi all,
with Zope version 2.5.1 I was get nice error messages from source of page. With 2.9.4 I was get error messages in file log/events.log which is better for security reasons, but these messages are not as exact as from old zope which give me point to failure like that:
Why would Zope 2.9 won't give you the same traceback? or a similar one? -aj
On Feb 5, 2008, at 11:53 , Andreas Jung wrote:
--On 5. Februar 2008 11:35:09 +0100 Jaroslav Lukesh <lukesh@seznam.cz> wrote:
Hi all,
with Zope version 2.5.1 I was get nice error messages from source of page. With 2.9.4 I was get error messages in file log/events.log which is better for security reasons, but these messages are not as exact as from old zope which give me point to failure like that:
Why would Zope 2.9 won't give you the same traceback? or a similar one?
Use the error_log object in the ZODB. It contains the tracebacks for all those exception types that are not in the (configurable) exclusion list. jens
----- Original Message ----- From: "Jens Vagelpohl" <jens@dataflake.org>
On Feb 5, 2008, at 11:53 , Andreas Jung wrote:
--On 5. Februar 2008 11:35:09 +0100 Jaroslav Lukesh <lukesh@seznam.cz> wrote:
with Zope version 2.5.1 I was get nice error messages from source of page. With 2.9.4 I was get error messages in file log/events.log which is better for security reasons, but these messages are not as exact as from old zope which give me point to failure like that:
Why would Zope 2.9 won't give you the same traceback? or a similar one?
Use the error_log object in the ZODB. It contains the tracebacks for all those exception types that are not in the (configurable) exclusion list.
jens
It is the same as the event.log plus whole request. But with Zope 251 error log points me to exact code with problem: (Object: REQUEST.set('Mailinf', Mailinf_VZ + email_delim + Mailinf_MZ + email_delim + Mailinf_GZ + email_delim + Mailinf_Zadavatel + email_delim + Mailinf_Kontakt + email_delim + Mailinf)) (Info: email_delim) File <string>, line 2, in f NameError: (see above) But 294 not: <DTMLMethod at /www/sys_list-item_text used for /www/cz> URL: http://xx/sys_list-item_text/manage_main Physical Path:/www/sys_list-item_text Module DocumentTemplate.DT_String, line 476, in __call__ Module DocumentTemplate.DT_In, line 703, in renderwob Module DocumentTemplate.DT_Try, line 140, in render Module DocumentTemplate.DT_Try, line 174, in render_try_except Module OFS.DTMLDocument, line 121, in __call__ <DTMLDocument at /www/cz/akcni> URL: http://xx/cz/akcni/manage_main Physical Path:/www/cz/akcni Module DocumentTemplate.DT_String, line 476, in __call__ Module DocumentTemplate.DT_Let, line 76, in render KeyError: 'prehled'
Jaroslav Lukesh wrote at 2008-2-5 13:21 +0100:
... It is the same as the event.log plus whole request.
But with Zope 251 error log points me to exact code with problem: ... But 294 not:
The modern tracebacks are usually far more informative than the old ones. True, they no longer show the source code but the "Module" info can easily be used to locate the corresponding source file. An the "line" info lets you find again the exact source code. -- Dieter
----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de>
... It is the same as the event.log plus whole request. But with Zope 251 error log points me to exact code with problem: But 294 not:
The modern tracebacks are usually far more informative than the old ones.
True, they no longer show the source code but the "Module" info can easily be used to locate the corresponding source file. An the "line" info lets you find again the exact source code.
Sorry, but I dont see any line of used DTML method to produce this error. In fact, the error is at line 313 (this number is not present at traceback) of DTML method named "titulni": Traceback (innermost last): Module ZPublisher.Publish, line 115, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 41, in call_object Module OFS.DTMLMethod, line 144, in __call__ - <DTMLMethod at /www/index_html> - URL: http://xx/index_html/manage_main - Physical Path: /www/index_html Module DocumentTemplate.DT_String, line 476, in __call__ Module Products.unitws, line 21, in render Module OFS.DTMLDocument, line 121, in __call__ - <DTMLDocument at /www/index.htm> - URL: http://xx/index.htm/manage_main - Physical Path: /www/index.htm Module DocumentTemplate.DT_String, line 476, in __call__ Module OFS.DTMLMethod, line 137, in __call__ - <DTMLMethod at /www/standard_html_body> - URL: http://xx/standard_html_body/manage_main - Physical Path: /www/standard_html_body Module DocumentTemplate.DT_String, line 476, in __call__ Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_With, line 76, in render Module DocumentTemplate.DT_Var, line 214, in render Module OFS.DTMLDocument, line 121, in __call__ - <DTMLDocument at /www/cz/kalendar/titulni> - URL: http://xx/cz/kalendar/titulni/manage_main - Physical Path: /www/cz/kalendar/titulni Module DocumentTemplate.DT_String, line 476, in __call__ Module Products.unitws, line 21, in render Module DocumentTemplate.DT_Util, line 196, in eval - __traceback_info__: REQUEST Module <string>, line 1, in <expression> NameError: name 'kalendar_titulni_pouze_akce_str' is not definedLine 313 where is the error looks:<dtml-call "REQUEST.set('akce', kalendar_titulni_pouze_akce_str)">Is somewhere some extra product or patch to show partial code where is error?Thanks, JL.
participants (4)
-
Andreas Jung -
Dieter Maurer -
Jaroslav Lukesh -
Jens Vagelpohl