Eigenbahn / ai-dungeon-cli

:european_castle: A cli client to play.aidungeon.io
MIT License
149 stars 33 forks source link

ImportError: cannot import name 'WebsocketsTransport' from 'gql' #36

Closed Blu-Tiger closed 1 year ago

Blu-Tiger commented 2 years ago

I get this error: from gql import gql, Client, WebsocketsTransport ImportError: cannot import name 'WebsocketsTransport' from 'gql'

flaryx32 commented 2 years ago

I fixed it by changing in every file needed with this from gql.transport.websockets import WebsocketsTransport.

Unknown-Negotiator commented 1 year ago

I fixed it by changing in every file needed with this from gql.transport.websockets import WebsocketsTransport.

Yeah, it works. Incorrect import commands are present in two files (was working in the Google colab):

  1. /usr/local/lib/python3.8/dist-packages/ai_dungeon_cli/impl/api/client.py
  2. /usr/local/lib/python3.8/dist-packages/ai_dungeon_cli/init.py

The package itself was installed using "pip install ai-dungeon-cli". Fix this one please.

p3r7 commented 1 year ago

ahem, the APIs of AI fungeon changed a bunch of times since last commit and we didn't catch up.

i'm highly dubbitative that fixing import paths would be enough to put back this thing in a working state.

(those "wrong" import paths where "right" at a time put gql pushed over an existing version tag, fwiw)

furthermore, it seems that AIDungeon as evolved to include features that'd be close to impossible to have in a pure CLI tool (image generation) + others that'd require moving to libcurses.

so, i guess that unless someone really wants to kickstart re-reverse engineering the new APIs this project should be archived.

furthermore i could repurpose it for this thing called, you know, ChatGPT.