-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnboundLocalError: local variable 'self' referenced before assignment #7867
Comments
Yesterday, @kozlovsky expressed suspicion that the issue could be related to the old Python version (3.8.4) used on our builder machines. Perhaps it's a good time to upgrade it to 3.9? @xoriole, is it easy to change the Python version on our builders? I can manage the change for GitHub actions. Ref: |
Sentry issue: TRIBLER-1JT for 7.13.1
|
The last linked Sentry issue shows another unrelated case of UnboundLocalError:
Here, the error happens inside the code of the logging library: def _log(self, level, msg, args, exc_info=None, extra=None, stack_info=False,
stacklevel=1):
"""
Low-level logging routine which creates a LogRecord and then calls
all the handlers of this logger to handle the record.
"""
sinfo = None
if _srcfile:
#IronPython doesn't track Python frames, so findCaller raises an
#exception on some versions of IronPython. We trap it here so that
#IronPython can use logging.
try:
fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
except ValueError: # pragma: no cover
fn, lno, func = "(unknown file)", 0, "(unknown function)"
else: # pragma: no cover
fn, lno, func = "(unknown file)", 0, "(unknown function)"
if exc_info: # <-- UnboundLocalError: local variable 'exc_info' referenced before assignment The only reasonable explanation of how this can happen is memory corruption by a misbehaving C++ code. Note that the error is inside the |
Traceback is different, but the underlying reason should be the same: memory corruption |
There is a chance #7945 can fix this problem. If not, then it is most probably libtorrent-related. My hope is that upgrading to Python 3.10, that is now possible, can fix the root reason of memory corruption problems. |
This issue has not seen activity for 60 days. It is now marked as stale. Please provide additional information or this issue may be closed in the future. We value your contribution and would love to hear more! |
The newest build implementation is now using Python 3.10. Looking at this discussion, this should be enough to resolve the various concerns listed here. |
Sentry Issue: TRIBLER-1JA
The text was updated successfully, but these errors were encountered: