There's probably a shorter path to my solution, so here's some background:

   1. I'm no Python expert, but neither is the creator of the app, and I 
   understand it better than he does.
   2. Somebody switched the app from a CENTOS server running Python 2.6 to 
   an Ubuntu server running Python 2.7
   3. App crashes on new server
   4. Error log doesn't show where the error is, only this:
      - mod_wsgi (pid=21820): Exception occurred processing WSGI script 
      '/var/www/.../myscript'.
      - 
      - TypeError: expected byte string object for header value, value of 
      type unicode found
   5. I think I can use log_exception(), but I need the instance of the 
   handler to hook it
   6. I surmise that mod_wsgi is acting as if it's creating an instance of 
   the server, then calling handlerInstance.run(myapp)

Is there an easier way to extract line number information out of the 
server? (currently: LogLevel info)
Else, is there a better way to get the stack trace other than hooking 
log_exception?
Else, what's a better way to hook log_exception?
Else, how do I grab the instance of the handler class?

Thanks for clues.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/modwsgi/-/2O4pmSYwabIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to