ai-dungeon-cli icon indicating copy to clipboard operation
ai-dungeon-cli copied to clipboard

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

Open Blu-Tiger opened this issue 2 years ago • 1 comments

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

Blu-Tiger avatar Apr 27 '22 10:04 Blu-Tiger

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

flaryx32 avatar May 15 '22 12:05 flaryx32

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.

Unknown-Negotiator avatar Dec 14 '22 19:12 Unknown-Negotiator

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.

p3r7 avatar Dec 14 '22 19:12 p3r7