Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies? Every so ofen I have a Zope object that's in error--a misplaced quote, an extra or missing bit of markup (dtml or html)--but finding it is a lengthy and frustrating process. A tool would be helpful. I've ggogled about looking but have not found anything. Pointers?
Using pychecker might help in situation although using PyChecker in a Zope environment is often tricky especially when ExtensionClasses are involved. -aj --On Samstag, 17. Mai 2003 8:27 Uhr -0700 Dennis Allison <allison@sumeru.stanford.EDU> wrote:
Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies?
Every so ofen I have a Zope object that's in error--a misplaced quote, an extra or missing bit of markup (dtml or html)--but finding it is a lengthy and frustrating process. A tool would be helpful. I've ggogled about looking but have not found anything. Pointers?
_______________________________________________ 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 )
At 19:54 2003-05-17 +0200, Andreas Jung wrote:
Using pychecker might help in situation although using PyChecker in a Zope environment is often tricky especially when ExtensionClasses are involved.
Is there a howto or anything similar on that? I once tried to use pychecker on my python product but gave up after a while because I couldn't get the importing stuff to work.
-aj
--On Samstag, 17. Mai 2003 8:27 Uhr -0700 Dennis Allison <allison@sumeru.stanford.EDU> wrote:
Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies?
Every so ofen I have a Zope object that's in error--a misplaced quote, an extra or missing bit of markup (dtml or html)--but finding it is a lengthy and frustrating process. A tool would be helpful. I've ggogled about looking but have not found anything. Pointers?
_______________________________________________ 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 )
_______________________________________________ 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 )
Dennis, Your message is difficult to respond to. That is, it is unclear what you are *really* looking for. For example you mention "inscrutable error messages" yet you gave no example "error messages". Error messages, if they are DTML related should not be "inscrutable". Error messages relating to "markup" are another story. If that is the story you are referring to then try something silly like this: 1) View your rendered code 2) Click your browser "view source" button 3) Save the viewed source to file 4) upload it to one of the publically available HTML checkers. If errors you mention are markup-related, a HTML checker will catch stuff that your specific browser may not. David ----- Original Message ----- From: "Dennis Allison" <allison@sumeru.stanford.EDU> To: <zope@zope.org> Sent: Saturday, May 17, 2003 8:27 AM Subject: [Zope] Syntax checker for Zope
Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies?
Every so ofen I have a Zope object that's in error--a misplaced quote, an extra or missing bit of markup (dtml or html)--but finding it is a lengthy and frustrating process. A tool would be helpful. I've ggogled about looking but have not found anything. Pointers?
_______________________________________________ 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 )
Sorry if was unclear. Let me try to clarify-- We have a number of pages which are relatively complex--lots of tables within tables within frames within dtml-this and dtml-that. In the process of editing, we sometimes inadvertantly create a syntax error which causes an error message, for example, unexpected end of dtml-let. Usually that's a problem caused by some other problem. It would be helpful to have some sort of tool which will help to localize the real cause rather then the effect. On Sun, 18 May 2003, David Hassalevris wrote:
Dennis, Your message is difficult to respond to. That is, it is unclear what you are *really* looking for. For example you mention "inscrutable error messages" yet you gave no example "error messages". Error messages, if they are DTML related should not be "inscrutable". Error messages relating to "markup" are another story. If that is the story you are referring to then try something silly like this: 1) View your rendered code 2) Click your browser "view source" button 3) Save the viewed source to file 4) upload it to one of the publically available HTML checkers. If errors you mention are markup-related, a HTML checker will catch stuff that your specific browser may not.
David ----- Original Message ----- From: "Dennis Allison" <allison@sumeru.stanford.EDU> To: <zope@zope.org> Sent: Saturday, May 17, 2003 8:27 AM Subject: [Zope] Syntax checker for Zope
Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies?
Every so ofen I have a Zope object that's in error--a misplaced quote, an extra or missing bit of markup (dtml or html)--but finding it is a lengthy and frustrating process. A tool would be helpful. I've ggogled about looking but have not found anything. Pointers?
That sounds really complex. I would break down your functions into smaller pieces. That would help clear it up. I'm sorry to report that I know of no such syntax checker, nor have I ever needed one :( Troy Dennis Allison wrote:
Sorry if was unclear. Let me try to clarify--
We have a number of pages which are relatively complex--lots of tables within tables within frames within dtml-this and dtml-that. In the process of editing, we sometimes inadvertantly create a syntax error which causes an error message, for example, unexpected end of dtml-let. Usually that's a problem caused by some other problem. It would be helpful to have some sort of tool which will help to localize the real cause rather then the effect.
This may or may not help your situation, but I have found that switching to TAL made enormous improvements in this type of problem. TAL checks the syntax prior to runtime -- if you try and save a template with incorrect syntax you will most often receive an error message upon saving. I have also found the error messages to be a bit more constructive and generally tend to point to the exact line where the error is located rather than referencing a line that has not much to do with where the error actually is. Kevin Dennis Allison wrote:
Sorry if was unclear. Let me try to clarify--
We have a number of pages which are relatively complex--lots of tables within tables within frames within dtml-this and dtml-that. In the process of editing, we sometimes inadvertantly create a syntax error which causes an error message, for example, unexpected end of dtml-let. Usually that's a problem caused by some other problem. It would be helpful to have some sort of tool which will help to localize the real cause rather then the effect.
On Sun, 18 May 2003, David Hassalevris wrote:
Dennis, Your message is difficult to respond to. That is, it is unclear what you are *really* looking for. For example you mention "inscrutable error messages" yet you gave no example "error messages". Error messages, if they are DTML related should not be "inscrutable". Error messages relating to "markup" are another story. If that is the story you are referring to then try something silly like this: 1) View your rendered code 2) Click your browser "view source" button 3) Save the viewed source to file 4) upload it to one of the publically available HTML checkers. If errors you mention are markup-related, a HTML checker will catch stuff that your specific browser may not.
David ----- Original Message ----- From: "Dennis Allison" <allison@sumeru.stanford.EDU> To: <zope@zope.org> Sent: Saturday, May 17, 2003 8:27 AM Subject: [Zope] Syntax checker for Zope
Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies?
Every so ofen I have a Zope object that's in error--a misplaced quote, an extra or missing bit of markup (dtml or html)--but finding it is a lengthy and frustrating process. A tool would be helpful. I've ggogled about looking but have not found anything. Pointers?
_______________________________________________ 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 )
On Sat, 2003-05-17 at 08:27, Dennis Allison wrote:
Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies?
ZChecker is an extremely crude start of one that is little more than a series of rules for objects. Since DTML can be such a pain there is almost zilch rules for that although I was going to add one that said "your DTML is too complex" :) Currently the nicest feature is it runs your ZPT through HTML Tidy and tells you the errors, trying to get pychecker to work with Python Scripts made my head hurt, but that would be nice to add. http://www.zope.org/Members/andym/ZChecker -- Andy McKay
Thank's Andy, I'll take a look. I tend to use more DTML than ZPT and the pages we create are often complex ensembles of DTML and HTML where it's hard to see the structure. Anything that helps localize a syntax error will be helpful. On Mon, 19 May 2003, Andy McKay wrote:
On Sat, 2003-05-17 at 08:27, Dennis Allison wrote:
Is there a syntax checking module for Zope, a program that can be used to help find those bugs that generate inscrutable error messages and not a hint as to where the real problem lies?
ZChecker is an extremely crude start of one that is little more than a series of rules for objects. Since DTML can be such a pain there is almost zilch rules for that although I was going to add one that said "your DTML is too complex" :)
Currently the nicest feature is it runs your ZPT through HTML Tidy and tells you the errors, trying to get pychecker to work with Python Scripts made my head hurt, but that would be nice to add.
http://www.zope.org/Members/andym/ZChecker -- Andy McKay
On Mon, 2003-05-19 at 13:48, Dennis Allison wrote:
Thank's Andy, I'll take a look. I tend to use more DTML than ZPT and the pages we create are often complex ensembles of DTML and HTML where it's hard to see the structure. Anything that helps localize a syntax error will be helpful.
Yeah like I say it does absolutely nothing for DTML, but it would be great if someone did do something with that. It would be really nice as well if DTML didnt need to be valid to be saved to Zope, in the same way for PythonScripts and ZPT, then this whole idea could be really useful... -- Andy McKay
participants (7)
-
Andreas Jung -
Andy McKay -
David Hassalevris -
Dennis Allison -
Kevin Carlson -
Peter Bengtsson -
Troy Farrell