krisppurg / dimscord

A Discord Bot & REST Library for Nim.
https://krisppurg.github.io/dimscord/
MIT License
222 stars 22 forks source link

Key not found: user #34

Closed ravener closed 3 years ago

ravener commented 3 years ago

I just got Nim today so I'm very new. Installed this and ran the readme example, the ready event triggers and prints but immediately after it crashes with this long error:

✘  ~/nimbot  ./main
Ready as Miyako Dev#4075
/data/data/com.termux/files/home/nimbot/main.nim(36) main
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1892) waitFor
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1582) poll
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1346) runOnce
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(210) processPendingCallbacks
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34) handleSocketMessageNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(420) handleSocketMessageIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319) handleDispatch
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37) handleDispatchNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(247) handleDispatchIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319) handleEventDispatch
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34) handleEventDispatchNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/dispatch.nim(707) handleEventDispatchIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319) guildCreate
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34) guildCreateNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/dispatch.nim(561) guildCreateIter
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/objects.nim(1123) newGuild
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/objects.nim(781) newEmoji
/data/data/com.termux/files/usr/lib/nim/lib/pure/json.nim(468) []
/data/data/com.termux/files/usr/lib/nim/lib/pure/collections/tables.nim(262) []
[[reraised from:
/data/data/com.termux/files/home/nimbot/main.nim(36) main
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1892) waitFor
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1582) poll
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1346) runOnce
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(210) processPendingCallbacks
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34) handleSocketMessageNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(420) handleSocketMessageIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319) handleDispatch
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37) handleDispatchNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(247) handleDispatchIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319) handleEventDispatch
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37) handleEventDispatchNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/dispatch.nim(707) handleEventDispatchIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncfutures.nim(383) read
]]
[[reraised from:
/data/data/com.termux/files/home/nimbot/main.nim(36) main
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1892) waitFor
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1582) poll
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1346) runOnce
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(210) processPendingCallbacks
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34) handleSocketMessageNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(420) handleSocketMessageIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319) handleDispatch
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37) handleDispatchNimAsyncContinue
/data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(247) handleDispatchIter
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncfutures.nim(383) read
]]
[[reraised from:
/data/data/com.termux/files/home/nimbot/main.nim(36) main
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1892) waitFor
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1582) poll
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1346) runOnce
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(210) processPendingCallbacks
/data/data/com.termux/files/usr/lib/nim/lib/pure/asyncfutures.nim(431) asyncCheckCallback
]]
Error: unhandled exception: key not found: user
Async traceback:
  /data/data/com.termux/files/home/nimbot/main.nim(36)                                    main
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1892)                waitFor
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1582)                poll
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1346)                runOnce
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(210)                 processPendingCallbacks
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34)                     handleSocketMessageNimAsyncContinue
  /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(420)  handleSocketMessageIter
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319)                    handleDispatch
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37)                     handleDispatchNimAsyncContinue
  /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(247)  handleDispatchIter
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319)                    handleEventDispatch
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34)                     handleEventDispatchNimAsyncContinue
  /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/dispatch.nim(707) handleEventDispatchIter
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319)                    guildCreate
  /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34)                     guildCreateNimAsyncContinue
  /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/dispatch.nim(561) guildCreateIter
  /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/objects.nim(1123) newGuild
  /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/objects.nim(781)  newEmoji
  /data/data/com.termux/files/usr/lib/nim/lib/pure/json.nim(468)                          []
  /data/data/com.termux/files/usr/lib/nim/lib/pure/collections/tables.nim(262)            []
  #[
    /data/data/com.termux/files/home/nimbot/main.nim(36)                                    main
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1892)                waitFor
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1582)                poll
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1346)                runOnce
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(210)                 processPendingCallbacks
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34)                     handleSocketMessageNimAsyncContinue
    /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(420)  handleSocketMessageIter
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319)                    handleDispatch
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37)                     handleDispatchNimAsyncContinue
    /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(247)  handleDispatchIter
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319)                    handleEventDispatch
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37)                     handleEventDispatchNimAsyncContinue
    /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/dispatch.nim(707) handleEventDispatchIter
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncfutures.nim(383)                  read
  ]#
  #[
    /data/data/com.termux/files/home/nimbot/main.nim(36)                                    main
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1892)                waitFor
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1582)                poll
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(1346)                runOnce
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncdispatch.nim(210)                 processPendingCallbacks
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(34)                     handleSocketMessageNimAsyncContinue
    /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(420)  handleSocketMessageIter
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(319)                    handleDispatch
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncmacro.nim(37)                     handleDispatchNimAsyncContinue
    /data/data/com.termux/files/home/.nimble/pkgs/dimscord-1.0.7/dimscord/gateway.nim(247)  handleDispatchIter
    /data/data/com.termux/files/usr/lib/nim/lib/pure/asyncfutures.nim(383)                  read
  ]#
Exception message: key not found: user
Exception type: [KeyError]
krisppurg commented 3 years ago

Do nimble install dimscord@#head

ravener commented 3 years ago

Thanks, installing head fixes it. Time to have fun with Nim now