socketIO-client-2
socketIO-client-2 copied to clipboard
TypeError in predicate function
Hi, thanks for your work, I encountered a problem when using this library (in Python 3), this is the error message:
File "......../socketIO_client/parsers.py", line 48, in traverse
if predicate(obj):
File "......../socketIO_client/parsers.py", line 39, in predicate
return '_placeholder' in obj and 'num' in obj
TypeError: argument of type 'int' is not iterable
I was able to fix by replace predicate
with:
def predicate(obj):
if type(obj) is dict:
return '_placeholder' in obj and 'num' in obj
else:
return False
I think it would be great to include this change in your repo, thanks.