| WebSeitz/wikilog |
| Zope Get Slice Bug |
|
| last edited by BillSeitz on Jul 14, 2008 3:36 pm |
aka Get Slice
Problem: http://groups.yahoo.com/group/zope/message/113478
One solution: http://groups.yahoo.com/group/zope/message/113482
tested that [URL] is a string --Bill Seitz, 2003/06/25 17:17 [GMT]
http://webseitz.fluxent.com/wiki/dtmlrequest shows:
URL 'http://webseitz.fluxent.com/wiki/dtmlrequest'
Test case to focus on --Bill Seitz, 2003/07/01 18:12 [GMT]
Most obvious in just trying to list the wiki contents, but since that's horribly long let's try something simpler.
http://216.17.130.14/fluxent/webseitz/wiki/manage_propertiesForm will be the page I try to get to.
So I need to figure out how to stop before the eval to look at the values of the params.
trying to debug --Bill Seitz, 2003/07/04 13:14 [GMT]
per http://www.zope.org/Documentation/Books/ZDG/current/TestingAndDebugging.stx
But after doing the import, when I try ZPublisher.Zope(/fluxent/webseitz/wiki/manage_propertiesForm')' it spits out a 401 (Unauthorized) response. Nothing in the docs says this will happen. I wonder if you can't use this method on [ZMI] [URLs]?
trying zLOG as another approach --Bill Seitz, 2003/07/15 17:22 [GMT]
to dump values like action and URL - (note that [ZLog] dumps msg to console, not to a file (for me) which causes problems when there's too much stuf)
but I keep getting error like "global name URL is not defined"
pointing to this
which makes it seem like I need to pass an argument somewhere, but I'm not really working at that level, so I don't know what to do, short of messing with code further up the stack (e.g. passing [REQUEST] into the containing method) which sounds like a bad idea.
back to debug process --Bill Seitz, 2003/07/15 23:21 [GMT]
following Jul4 document, but different process - " Interactive Debugging Triggered From the Web"
insert this into *.py code where you want to set a breakpoint:
import pdb pdb.set_trace()
then start up Zope normally (but with the -d flag)
then request the appropriate [URL] from the browser - console will pop you into debugger at that breakpoint. I hope.
seems to work --Bill Seitz, 2003/07/16 02:32 [GMT]
Gets into pdb. Here's pdb docs
type n to skip ahead from inside of set_trace - end up at eval(code,d)
type p d to print value of d and get pile of HTML which looks like output of the dtml-request method (Jun25)
trying p code spits out that you have a type code object - p str(code) doesn't do you any good.
p dir(code) gives list of attributes(?) including 'co_code'; some research says that's of type object? Shows referenced as 'code.co_code'; p type(code.co_code) returns string. But p code.co_code outputs some shmutz - UniCode?
let's move along. Try an s to step in. Hmmm, I just continue to get lost. It seems to loop back around to that same exec over and over again - I don't know if I've already triggered the error, or if that happens later on. If I try doing c it repeats something else - I think now it's generating the error traceback page. The browser gets the page eventually. If I request the page again it doesn't seem to go into pdb, I end up with some other traceback involving raise bdb.BdbQuit
Will try some more tomorrow.
code objects --Bill Seitz, 2003/07/16 02:37 [GMT]
ah, that's a pointer to pseudo-compiled code - see here and find "code objects"
have no clue how to move forward --Bill Seitz, 2003/07/16 21:21 [GMT]
Tried setting the breakpoint at various places, but I honestly have no idea what I'm even looking for.
If a 3rd party isn't going to save my bacon, I need to figure out a new approach.
perfect timing! --Bill Seitz, 2003/07/16 21:33 [GMT]
[Jamie Heilman] pointed out the problem must be from having an object named URL in the folder. That's it! He suggested a code change (in manage_tabs.dtml), but I just settled for removing the object.
| See Back Links: Zope Catalog | Zwiki Freebsd Stability Problems | Get Slice | |
| User Options Recent Changes Help Page |