尝试使用pympler.tracker时,获取错误未初始化的ASN.1值.SummaryTracker()

时间:2017-02-07 11:42:20

标签: python python-2.7

我的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()时,它就像一个魅力。

感谢。

1 个答案:

答案 0 :(得分:0)

pip install -U pyasn1

请尝试升级pyasn1版本