pdb断点未在显式文件上触发

时间:2015-04-17 19:34:57

标签: python pdb

问题:我的断点错误是什么?

到目前为止我尝试了什么: Attempting to figure out a bug with distlib我试图在distlib.metadata.Metadata.get_requirements中触发断点。在python3.4解释器中,我已经运行

(Pdb) import distlib.metadata
(Pdb) b distlib.metadata.Metadata.get_requirements
Breakpoint 7 at /Users/alexlord/.virtualenvs/porting_authority/lib/python3.4/site-    packages/distlib/metadata.py:844
(Pdb) meta_data.get_requirements(['uttt'], set())
*** TypeError: string indices must be integers

但断点并没有像我预期的那样发射。

完整堆栈跟踪

Traceback (most recent call last):                                                                  
  File "<stdin>", line 1, in <module>                                                               
  File "/home/alex/.virtualenvs/caniusepython3/lib/python3.4/site-packages/distlib-0.2.0-py3.4.egg/distlib/metadata.py", line 874, in get_requirements                                                  
    result.extend(d['requires'])                                                                    
TypeError: string indices must be integers  

上下文

这是我试图找出的错误。

from distlib.database import Metadata
meta_data = Metadata()
meta_data.get_requirements(['uttt'], set()) # Valid pypi package, ultimate tick tack toe =P

0 个答案:

没有答案