我的python2.7代码中有内存泄漏,我正在尝试使用pympler
进行调试。
Traceback (most recent call last):
File "eta/dynamic_eta_worker.py", line 29, in <module>
tr = tracker.SummaryTracker()
File "/usr/local/lib/python2.7/site-packages/pympler/tracker.py", line 45, in __init__
self.s0 = summary.summarize(muppy.get_objects())
File "/usr/local/lib/python2.7/site-packages/pympler/summary.py", line 131, in summarize
total_size[otype] = _getsizeof(o)
File "/usr/local/lib/python2.7/site-packages/pyasn1/type/base.py", line 145, in plug
raise error.PyAsn1Error('Uninitialized ASN.1 value ("%s" attribute looked up)' % name)
pyasn1.error.PyAsn1Error: Uninitialized ASN.1 value ("__sizeof__" attribute looked up)
试图在这里和谷歌搜索,什么也没出来
问题是,当我从python控制台调用pympler.tracker.SummaryTracker()
时,它就像一个魅力。
感谢。
答案 0 :(得分:0)
pip install -U pyasn1
请尝试升级pyasn1版本