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
$ python --version
Python 3.4.2
$ uname -a
Linux hostname 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
$ cat /etc/issue
Raspbian GNU/Linux 8 \n\l
It seems to me that when iterating through the user_data list, it is possible to come across a None object in the list, and that trying to access the 'id' key of the (what is presumed, falsely to be a) dict results in a TypeError since the element in user_data is not in fact a dict.
A naïve fix for this would be to change the line to read:
but I expect that there might be other code that expects user_data to not have a None in it either, and so there needs to be better filtering on elements going into the user_data list in order to enforce that only proper/expected objects make their way in there.
Let me know if you want any more info, etc.
Also, thanks for making this! It's much better than the code that slack themselves put out for working with the RTM API.
The text was updated successfully, but these errors were encountered:
After running for a while, slackbot will inevitably crash with this error.
Some system information:
It seems to me that when iterating through the
user_data
list, it is possible to come across aNone
object in the list, and that trying to access the 'id' key of the (what is presumed, falsely to be a)dict
results in aTypeError
since the element inuser_data
is not in fact adict
.A naïve fix for this would be to change the line to read:
but I expect that there might be other code that expects
user_data
to not have aNone
in it either, and so there needs to be better filtering on elements going into theuser_data
list in order to enforce that only proper/expected objects make their way in there.Let me know if you want any more info, etc.
Also, thanks for making this! It's much better than the code that slack themselves put out for working with the RTM API.
The text was updated successfully, but these errors were encountered: