Why doesnt PDB allow me to view the current line?

Diez B. Roggisch deets at nospam.web.de
Thu Jun 19 03:18:12 EDT 2008


hardcoreUFO schrieb:
> I have some code that I am trying to debug (Python 2.5.2 on OSX) using
> pdb. However, when the code reaches the pdb.set_trace(), it does not
> allow me to view the current line:
> 
>> /Users/chris/Research/ISEC/build/bdist.macosx-10.3-i386/egg/pyrl/reinforcement.py(943)__call__()
> (Pdb) n
>> /Users/chris/Research/ISEC/build/bdist.macosx-10.3-i386/egg/pyrl/reinforcement.py(946)__call__()
> (Pdb) l
> [EOF]
> (Pdb) l
> [EOF]
> 
> It steps through the code fine, but for some reason returns end-of-
> file when I want to look at the code.

It might be that the egg is installed as ZIP. Try either decompressing 
it, or re-install using

easy_install -Z <egg>

If it is "your" egg, add zip_safe=False (or such) to the setup.py

Diez



More information about the Python-list mailing list