how to display variables down a stackdump when an exception occurred

N

News123

Hi,

I captured a piece of code with a try except statement:

In the except part I display a stackdump


try:
domyxmlrpcstuff()
except Exception as e:
import traceback
ex_type,ex_value,e_b = sys.exc_info()
tbstring = traceback.format_exc()
print '%s%s:%s:%s' % \
(msg,ex_type,ex_value,tbstring)


The output, that I receive is:
File "C:\mycode\myrpcclient.py", line 63, in upload_chunk
rslt = myrpcclient.call()
File "C:\Python26\lib\xmlrpclib.py", line 1199, in __call__
return self.__send(self.__name, args)
File "C:\Python26\lib\xmlrpclib.py", line 1489, in __request
verbose=self.__verbose
File "C:\Python26\lib\xmlrpclib.py", line 1253, in request
return self._parse_response(h.getfile(), sock)
File "C:\Python26\lib\xmlrpclib.py", line 1387, in _parse_response
p.feed(response)
File "C:\Python26\lib\xmlrpclib.py", line 601, in feed
self._parser.Parse(data, 0)
ExpatError: syntax error: line 1, column 0

In order to understand more I would like to display the value of
data in C:\Python26\lib\xmlrpclib.py", line 601

Is this possible in a non interactive fashion?

This is a generic question about inspecting variables down the stack,
whenever an exception occurs.

I started another thread specifically about displaying the invalid
xmlrpc data.




N
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top