Incomplete exception tracebacks when importing from zipped modules

A

arve.knudsen

I can't seem to get complete tracebacks when modules imported from zip
archives raise exceptions. For instance, consider the following
module:
def i_raise():
raise Exception("Test!")

i_raise()


When I import this module, within a .zip, from a script, I get the
following traceback:
Traceback (most recent call last):
File "tst.py", line 1, in <module>
import tst_mod
File "build\bdist.win32\egg\tst_mod.py", line 4, in <module>
File "build\bdist.win32\egg\tst_mod.py", line 2, in i_raise
Exception: Test!


As you can see, the code for each stack entry is omitted. Is this
normal??

traceback.print_exc() has the same problem, BUT; if I happen to call
traceback.print_stack within tst_mod, traceback.print_exc prints a
complete traceback in the calling script (i.e., including source code
per stack frame). Mysterious ..
 
G

Gabriel Genellina

En Thu, 02 Apr 2009 09:35:53 -0300, (e-mail address removed)
I can't seem to get complete tracebacks when modules imported from zip
archives raise exceptions. [...]
As you can see, the code for each stack entry is omitted. Is this
normal??

A known problem, at least...
You should be able to find it reported somewhere at http://bugs.python.org
 

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,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top