ltworf / localslackirc

IRC gateway for slack, running on localhost for one user. The project is now on codeberg.
https://codeberg.org/ltworf/localslackirc
GNU General Public License v3.0
138 stars 24 forks source link

crash #454

Closed userappgate closed 7 months ago

userappgate commented 7 months ago
Cancelling running tasks
Traceback (most recent call last):
  File "/usr/bin/localslackirc", line 24, in <module>
    main()
  File "/usr/share/localslackirc/irc.py", line 1167, in main
    asyncio.run(restart_listener_loop())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/share/localslackirc/irc.py", line 1163, in restart_listener_loop
    await irc_listener()
  File "/usr/share/localslackirc/irc.py", line 1131, in irc_listener
    await asyncio.gather(
  File "/usr/share/localslackirc/irc.py", line 1184, in to_irc
    await ircclient.slack_event(ev)
  File "/usr/share/localslackirc/irc.py", line 870, in slack_event
    await self._message(sl_ev)
  File "/usr/share/localslackirc/irc.py", line 792, in _message
    thread = await self.sl_client.get_thread(sl_ev.thread_ts, sl_ev.channel)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/localslackirc/slack.py", line 817, in get_thread
    history = await self.get_history(original_channel, thread_ts, None, 1, True)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/localslackirc/slack.py", line 426, in get_history
    return self.tload(p, History)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/localslackirc/slack.py", line 408, in tload
    return self.loader.load(data, type_)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 301, in load
    raise e
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 297, in load
    return func(self, value, type_)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 622, in _namedtupleload
    return _objloader(l, fields, necessary_fields, type_hints, value, type_)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 601, in _objloader
    raise e
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 597, in _objloader
    params[k] = loader_f(l, v, field_type)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 216, in <lambda>
    (is_list, lambda l, value, type_: _iterload(l, value, type_, list)),
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 938, in _iterload
    raise e
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 933, in _iterload
    return function(map(f, repeat(l), compress(value, ctr), repeat(t)))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 743, in _unionload
    raise TypedloadValueError(
typedload.exceptions.TypedloadValueError: Value of dict could not be loaded into slack.HistoryMessage | slack.HistoryBotMessage
Path: .messages.[0]
Exceptions:
  Value does not contain fields: {'subtype', 'bot_id'} which are necessary for type HistoryBotMessage
  Path: .messages.[0]
  Value does not contain fields: {'size', 'url_private'} which are necessary for type File
  Path: .messages.[0].files.[1]