Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Blu-Tiger opened this issue Apr 27, 2022 · 3 comments
Closed

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

Blu-Tiger opened this issue Apr 27, 2022 · 3 comments

Comments

@Blu-Tiger
Copy link

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

@flaryx32
Copy link

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

@Unknown-Negotiator
Copy link

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
Copy link
Member

p3r7 commented Dec 14, 2022

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 p3r7 closed this as completed Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants