How to include session data in error tickets

44 views
Skip to first unread message

Chris

unread,
Sep 29, 2015, 7:00:51 PM9/29/15
to web2py-users
Hello,

I put this function in my controller to test error handling:

def error():
    raise Exception("I am a test error.")

When I go to /error, I get an error ticket, as expected, but that error doesn't include any data, just the traceback. I seem to recall a few years back that tickets would include helpful things like the current session state, variables being passed to each function, etc. but now I almost never see that information.

Did something change in web2py? I feel like this should be obvious but I'm at a loss for where to look.

Thanks!

黄祥

unread,
Sep 29, 2015, 7:57:12 PM9/29/15
to web2py-users
not sure, i got about your question, if you click the link that show error traceback, scroll it, on the middle there is context that contain some button : locals, request, session, response
just click the session button, then you can see what the current session active in the error page.

best regards,
stifan

Christopher L

unread,
Sep 30, 2015, 11:31:47 AM9/30/15
to web...@googlegroups.com
Hi Stifan,

Yes, that's exactly the part I used to see (locals, request, session, response) that I'm not seeing anymore! Very odd.
Here's what the ticket looks like to me: http://imgur.com/kowN8eg

Thanks! -C



--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/H4kShWCTDi4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave S

unread,
Sep 30, 2015, 4:25:01 PM9/30/15
to web2py-users


On Wednesday, September 30, 2015 at 8:31:47 AM UTC-7, Chris wrote:
Hi Stifan,

Yes, that's exactly the part I used to see (locals, request, session, response) that I'm not seeing anymore! Very odd.
Here's what the ticket looks like to me: http://imgur.com/kowN8eg



Having spent much of the last day or two generating tickets (not by choice, mind you), I can tell you "it varies".

I had a bad unindent and that ticket did  generate buttons for locals, etc.   Ditto a missing close-quote on a string literal., ditto "object of type 'Row' has no len()".

I also had attribute error tickets, with no buttons, and a "global name 'now' is not defined", also with no buttons, and again with "missing 'pass' in view".

So it looks like it depends on the specific error and where it is detected.

/dps





 

Christopher L

unread,
Sep 30, 2015, 5:36:51 PM9/30/15
to web...@googlegroups.com
Interesting - that's what I was worried about. Does anyone know how web2py decides when to include useful info/when it's able to?

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/H4kShWCTDi4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages