For the Zope community
Zopistas, It has been very rewarding to work with DC and the Zope community. I have learned a lot about software and community spirit. I have never had the opportunity to work with a more enthusiastic and dedicated group of developers. So at this time I'm releasing two new products designed to help Zope users to get their job done more easily. http://www.zope.org/Members/hathawsh/ZDebug/index_html ZDebug is a set of patches to Zope that help in the deciphering of DTML errors and authorization exceptions. Because this is the first release, remember to make a backup before installing. http://www.zope.org/Members/hathawsh/tcpwatch/index_html TCPWatch is a simple Python script that lets you monitor a TCP connection. It does *not* depend on Zope, but it can be especially useful when writing Zope apps for WAP devices because the WAP devices will not display Zope exceptions while TCPWatch will. It's also useful for debugging any TCP/IP-based protocol implementation. Keep up the awesome work! Shane
Shane Hathaway wrote:
http://www.zope.org/Members/hathawsh/ZDebug/index_html
ZDebug is a set of patches to Zope that help in the deciphering of DTML errors and authorization exceptions. Because this is the first release, remember to make a backup before installing.
Saw the screenshots and thought "this looks amazingly useful" :-) It was, but, the version from the tarball doesn't seem to match up quite with: http://www.zope.org/Members/hathawsh/ZDebug/example Using your sample 'bad' DTML, I got the same but the 'Contains name?' column didn't show up :-( Any ideas? (yes, I was tracking down a security exception, and that column may have been really useful ;-) ...speaking of which, this is related to the following PTK Tracker Issue: http://www.zope.org/Products/PTK/Tracker/110 while Andy and I were playing with some stuff, we managed to make ZDebug cry by giving the discussion_thread_view DTML method the 'Member' proxy role and then viewing it from a Member's toolbox (what's the new name for that?) on the left: Error Type: TypeError Error Value: not all arguments converted (if any more details would be helpful, please drop either of us a mail, traceback in ps) Well, thanks for the product, it looks like being _extremely_ useful :-))
Keep up the awesome work!
Urm, I'm sure it's the community who should be saying that to you :P Chris PS: Traceback (innermost last): File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 222, in publish_module File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 187, in publish File E:\Zope\227194~1.0\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: index_html) File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 171, in publish File E:\Zope\227194~1.0\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: discussion_thread_view) File E:\Zope\227194~1.0\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: discussion_thread_view) File E:\Zope\227194~1.0\lib\python\OFS\DTMLMethod.py, line 167, in __call__ (Object: discussion_thread_view) File E:\Zope\2.2.0\lib\python\Products\ZDebug\DTMLLocator.py, line 103, in __call__ (Object: discussion_thread_view) File E:\Zope\227194~1.0\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: discussion_thread_view) File E:\Zope\2.2.0\lib\python\Products\ZDebug\DTMLDebug.py, line 259, in debug_render_blocks File E:\Zope\2.2.0\lib\python\Products\ZDebug\DTMLDebug.py, line 179, in debugException (Object: title) File E:\Zope\227194~1.0\lib\python\OFS\DTMLMethod.py, line 189, in validate (Object: discussion_thread_view) File E:\Zope\227194~1.0\lib\python\AccessControl\SecurityManager.py, line 139, in validate File E:\Zope\2.2.0\lib\python\Products\ZDebug\DebugSecurityPolicy.py, line 234, in validate TypeError: (see above)
Chris Withers wrote:
Using your sample 'bad' DTML, I got the same but the 'Contains name?' column didn't show up :-(
Any ideas? (yes, I was tracking down a security exception, and that column may have been really useful ;-)
My guess is you're using Zope 2.1.6. ZDebug doesn't have a way to figure out what DTML method is being called in Zope 2.1.6. Strange but true. So it shows what it can. The 2.2.x security context stack is used to figure it out in 2.2.x. (Which is still a hack. :-/ )
...speaking of which, this is related to the following PTK Tracker Issue:
http://www.zope.org/Products/PTK/Tracker/110
while Andy and I were playing with some stuff, we managed to make ZDebug cry by giving the discussion_thread_view DTML method the 'Member' proxy role and then viewing it from a Member's toolbox (what's the new name for that?) on the left:
Error Type: TypeError Error Value: not all arguments converted
Oops! Try this patch (I left out a "%s"): =================================================================== RCS file: /cvs-repository/Packages/Products/ZDebug/DebugSecurityPolicy.py,v retrieving revision 1.2 diff -u -r1.2 DebugSecurityPolicy.py --- DebugSecurityPolicy.py 2000/09/04 19:23:58 1.2 +++ DebugSecurityPolicy.py 2000/09/06 14:04:32 @@ -234,8 +234,8 @@ info = 'The proxy roles set for ' \ '%s do not allow access to %s, which is ' \ 'contained in %s. The proxy roles would ' \ - 'have to include one of the following roles:' \ - % ( + 'have to include one of the following ' \ + 'roles: %s' % ( getCleanPath(eo), cleanupName(name, value), getCleanPath(container, value), tuple(roles))
Well, thanks for the product, it looks like being _extremely_ useful :-))
Thank you. I know when I was new to Zope this would have been tremendously useful. Now it's useful because it should help people solve problems on their own rather than having to post to the list. Shane
Hi Shane, I dug up the mail :-) Shane Hathaway wrote:
Chris Withers wrote:
Using your sample 'bad' DTML, I got the same but the 'Contains name?' column didn't show up :-(
Any ideas? (yes, I was tracking down a security exception, and that column may have been really useful ;-)
My guess is you're using Zope 2.1.6. ZDebug doesn't have a way to figure out what DTML method is being called in Zope 2.1.6. Strange but true. So it shows what it can. The 2.2.x security context stack is used to figure it out in 2.2.x. (Which is still a hack. :-/ )
Sorry, but I was using either Zope 2.2.0 or 2.2.1 :-S Has this been covered by other bugfixes?
Oops! Try this patch (I left out a "%s"):
<snip patch> I guess that made it into the new version of ZDebug? Right, next up, it would be really useful if the error page could show a dump of the REQUEST object. So I tried this patch: --- dtmlexc.dtml Thu Sep 14 15:28:18 2000 +++ dtmlexc.dtml.new Thu Sep 14 15:26:59 2000 @@ -56,5 +56,9 @@ expr="source_info[2]" html_quote></pre> </td></tr></table> </dtml-if> +<p><strong>REQUEST</strong></p> +<table bgcolor="#cccccc"><tr><td> +<dtml-var REQUEST> +</td></tr></table> </body> </html> Sadly, whenever this code gets called, Zope restarts! :-( Any ideas? (this was all on Zope 2.2.0 and 2.2.1) cheers, Chris
Shane Hathaway wrote:
TCPWatch is a simple Python script that lets you monitor a TCP connection.
...now this really is extremely useful to me, but not for Zope ;-) However, it did take me a while to wrap my head around it. So here's a little How-To/Example (If anyone thinks I should do this as a How-To on Zope.org, just let me know...) 1. Run up Zope on you local machine on port 8080 2. Set the following off in an appropriate shell: python tcpwatch.py 9080 localhost 8080 3. Point a browser at localhost:9080 Now, the tkinter window that pops up will show you a list of TCP connections that happen and when they started. If you click on them you get shown all the data which was sent to the server (preceded by '==>') and to the client (preceded by '<==') as well as the times the connections opened and closed (could be very useful for spotting connections that Zope, or anything else, leaves open longer than it should) This is a very cool little tool :-) Many thanks, Chris
Chris Withers wrote:
Shane Hathaway wrote:
TCPWatch is a simple Python script that lets you monitor a TCP connection.
...now this really is extremely useful to me, but not for Zope ;-)
However, it did take me a while to wrap my head around it. So here's a little How-To/Example (If anyone thinks I should do this as a How-To on Zope.org, just let me know...)
1. Run up Zope on you local machine on port 8080 2. Set the following off in an appropriate shell:
python tcpwatch.py 9080 localhost 8080
I thought about writing a server-starter GUI so that command line wouldn't even be necessary. But I decided I like TCPWatch how it is already. It's simple and to the point.
3. Point a browser at localhost:9080
Now, the tkinter window that pops up will show you a list of TCP connections that happen and when they started. If you click on them you get shown all the data which was sent to the server (preceded by '==>') and to the client (preceded by '<==') as well as the times the connections opened and closed (could be very useful for spotting connections that Zope, or anything else, leaves open longer than it should)
This is a very cool little tool :-)
It should work with most TCP protocols including smtp, imap, pop-3, ssh, ZEO, and even that new multi-stream protocol announced recently. It might have troubles with ftp, however. BTW it uses decimal rather than octal to encode control characters, which doesn't follow the "standard" but rather my own preference. :-) It should probably be a command-line option. Shane
participants (2)
-
Chris Withers -
Shane Hathaway