You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread Thread-1 (monitor):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 946, in run
self._target(*self._args, **self._kwargs)
File "/home/dima/PycharmProjects/flats/venv/lib/python3.10/site-packages/hanging_threads.py", line 97, in monitor
new_threads = get_current_frames()
File "/home/dima/PycharmProjects/flats/venv/lib/python3.10/site-packages/hanging_threads.py", line 140, in get_current_frames
return dict(
File "/home/dima/PycharmProjects/flats/venv/lib/python3.10/site-packages/hanging_threads.py", line 142, in <genexpr>
'frame': thread2list(frame),
File "/home/dima/PycharmProjects/flats/venv/lib/python3.10/site-packages/hanging_threads.py", line 180, in thread2list
l.insert(0, frame2string(frame))
File "/home/dima/PycharmProjects/flats/venv/lib/python3.10/site-packages/hanging_threads.py", line 170, in frame2string
line = linecache.getline(filename, lineno, frame.f_globals).lstrip()
File "/usr/lib/python3.10/linecache.py", line 31, in getline
if 1 <= lineno <= len(lines):
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
The text was updated successfully, but these errors were encountered:
I believe that this happens when python code execution goes into C code in libraries - in my case pillow.
Adding if lineno is None: lineno = -1 in frame2string in hanging_threads.py should fix the problem. It doesn't raise an error as linecache just returns an empty string if the lineno is less than 1.
Python 3.10, hanging_threads-2.0.5
The text was updated successfully, but these errors were encountered: