UQComputingSociety / uqcsbot-slack

:mortar_board: UQCSbot: our friendly little Slack bot
https://slack.uqcs.org.au
MIT License
55 stars 44 forks source link

User tracking based on joins and quits is broken #510

Open TRManderson opened 4 years ago

TRManderson commented 4 years ago
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/srv/uqcsbot/lib/python3.6/site-packages/uqcsbot/__main__.py", line 2, in <module>
    main()
  File "/srv/uqcsbot/lib/python3.6/site-packages/uqcsbot/__init__.py", line 160, in main
    bot.run(user_token, bot_token)
  File "/srv/uqcsbot/lib/python3.6/site-packages/uqcsbot/base.py", line 342, in run
    run_future(self.rtm_client.start())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/srv/uqcsbot/lib/python3.6/site-packages/slack/rtm/client.py", line 339, in _connect_and_read
    await self._read_messages()
  File "/srv/uqcsbot/lib/python3.6/site-packages/slack/rtm/client.py", line 390, in _read_messages
    await self._dispatch_event(event, data=payload)
  File "/srv/uqcsbot/lib/python3.6/site-packages/uqcsbot/base.py", line 126, in _dispatch_event
    await coro
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/uqcsbot/lib/python3.6/site-packages/uqcsbot/api.py", line 433, in _on_user_change
    user = self._users_by_id[evt['user']['id']]
KeyError: '<someone's user id was here>'