-
Notifications
You must be signed in to change notification settings - Fork 452
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
TypeError: 'Context' object is not callable #7856
Comments
It's challenging to determine what is happening in this event with only the provided stack trace. However, in the arguments, we can see def peer_disconnected(peer_id: bytes):
... But I believe that this event is just a random event. def _run(self):
try:
self._context.run(self._callback, *self._args)
except (SystemExit, KeyboardInterrupt):
raise
except BaseException as exc:
cb = format_helpers._format_callback_source(
self._callback, self._args)
msg = f'Exception in callback {cb}'
context = {
'message': msg,
'exception': exc,
'handle': self,
}
if self._source_traceback:
context['source_traceback'] = self._source_traceback
self._loop.call_exception_handler(context)
self = None # Needed to break cycles when an exception occurs. But we are patching the original asyncio tribler/src/tribler/core/utilities/slow_coro_detection/patch.py Lines 28 to 47 in 35c0930
The candidate for a Context class is the following: https://docs.python.org/3/library/contextvars.html#contextvars.Context At the moment, my best guess is that the problem is not related to the notifier itself, but rather to asyncio or the way we are modifying it. |
@kozlovsky, as the author of the asyncio patch, could you please have a quick look at it? |
Looks strange. I can't preclude that the error results from someone's experiments with the Tribler code. I'd suggest waiting until we have a second case of this error to be sure it is an actual error and not the result of running a modified code. Some additional observations:
|
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 code that this issue refers to has now been removed and this issue is no longer relevant. |
Sentry Issue: TRIBLER-1J6
The text was updated successfully, but these errors were encountered: