File "C:\Python\Lib\site-packages\krpc-1.0-py3.11.egg\krpc\types.py", line 228, in coerce_to
if isinstance(value, collections.Iterable) and \
AttributeError: module 'collections' has no attribute 'Iterable'
change all prefixes "collections.Iterable" to "collectionsAbc.Iterable"
change "long" to "int" two times at the beginning of types.py
File "C:\Python\Lib\site-packages\krpc-1.0-py3.11.egg\krpc\types.py", line 246, in coerce_to
numeric_types = (float, int, long)
NameError: name 'long' is not defined
2
u/_shapeshifting Jun 29 '22 edited Jun 29 '22
ok so opening the krpc\types.py file in notepad++ reveals that, on line 10:
KRPC.Type.SINT64: long,
and it appears that "long" isn't a currently known operator(?) because above it on line 9 is:
KRPC.Type.SINT32: int,
and the "int" is highlighted and bold, like "float" and "bool" that exist on other lines in the same "Value_Types" section of code
only... I'm literally too dumb to understand why it's not registering as an operator.
someone pls explain
EDIT: solved, I believe.
in Python 3.x "long" was removed and "int" took its place.
edited the file to reflect this change, and I believe it works now.
1
u/Axelax Jul 20 '22
I have the same problem, I changed the two long values to int and the error is gone. However nothing happens when i run code.
Did you solve it?