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
My code reported this error:
File "/home/lib/python3.4/site-packages/blinker/_saferef.py", line 197, in calculate_key
return (id(get_self(target)), id(get_func(target)))
AttributeError: 'function' object has no attribute 'self' .
When i print(dir(target)) i got this:
['annotations', 'call', 'class', 'closure', 'code', 'defaults', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'get', 'getattribute', 'globals', 'gt', 'hash', 'init', 'kwdefaults', 'le', 'lt', 'module', 'name', 'ne', 'new', 'qualname', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'accept', 'im_func', 'im_self', 'is_signal_handler']
There is no 'self', just 'im_self'. I tried to change the code on line 50 in file _saferef.py:
from if sys.version_info < (3,):
to if sys.version_info > (3,):
and my code works. Is it a mistake in my code or is it a bug ?
Thank you for your patience.
The text was updated successfully, but these errors were encountered:
Can you paste a test case that produces that traceback? All the tests pass on 3.4, so perhaps something is missing in the tests or in the (increasingly creaky) saferef implementation.
My code reported this error:
File "/home/lib/python3.4/site-packages/blinker/_saferef.py", line 197, in calculate_key
return (id(get_self(target)), id(get_func(target)))
AttributeError: 'function' object has no attribute 'self' .
When i print(dir(target)) i got this:
['annotations', 'call', 'class', 'closure', 'code', 'defaults', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'get', 'getattribute', 'globals', 'gt', 'hash', 'init', 'kwdefaults', 'le', 'lt', 'module', 'name', 'ne', 'new', 'qualname', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'accept', 'im_func', 'im_self', 'is_signal_handler']
There is no 'self', just 'im_self'. I tried to change the code on line 50 in file _saferef.py:
from if sys.version_info < (3,):
to if sys.version_info > (3,):
and my code works. Is it a mistake in my code or is it a bug ?
Thank you for your patience.
The text was updated successfully, but these errors were encountered: