Giter Site home page Giter Site logo

Comments (4)

p3r7 avatar p3r7 commented on July 26, 2024

Mhm, this is weird that you get gql-3.0.0a4 instead of gql-3.0.0a1.

Did you install in any sort of venv to ensure isolation?

Regarding the 2nd error, it's due to recent changes in AIDungeon HTTP API, that broke this cli client.

The ticket to discuss those is: #29 (comment)

We need to re-do inspection / reveng to re-adapt the code. That's just the 4th time this happens.

from ai-dungeon-cli.

Nocxr avatar Nocxr commented on July 26, 2024

I removed the previous version I cloned in and installed and then retried with a venv following the commands listed on the repo page, it still installed the a4 package automatically:

mnowak@L5110:~$ git clone https://github.com/Eigenbahn/ai-dungeon-cli.git
Cloning into 'ai-dungeon-cli'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 430 (delta 15), reused 29 (delta 11), pack-reused 393
Receiving objects: 100% (430/430), 108.32 KiB | 1.13 MiB/s, done.
Resolving deltas: 100% (214/214), done.
mnowak@L5110:~$ cd ai-dungeon-cli
mnowak@L5110:~/ai-dungeon-cli$ virtualenv -p $(command -v python3) ai-dungeon-cli-venv
created virtual environment CPython3.8.5.final.0-64 in 380ms
  creator CPython3Posix(dest=/home/mnowak/ai-dungeon-cli/ai-dungeon-cli-venv, clear=False, global=False)
  seeder FromAppData(download=False, CacheControl=latest, distro=latest, idna=latest, distlib=latest, pep517=latest, progress=latest, contextlib2=latest, urllib3=latest, pyparsing=latest, msgpack=latest, ipaddr=latest, packaging=latest, wheel=latest, requests=latest, webencodings=latest, pip=latest, certifi=latest, six=latest, html5lib=latest, colorama=latest, chardet=latest, lockfile=latest, pkg_resources=latest, setuptools=latest, appdirs=latest, retrying=latest, pytoml=latest, via=copy, app_data_dir=/home/mnowak/.local/share/virtualenv/seed-app-data/v1.0.1.debian)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
mnowak@L5110:~/ai-dungeon-cli$ source ai-dungeon-cli-venv/bin/activate
(ai-dungeon-cli-venv) mnowak@L5110:~/ai-dungeon-cli$ python3 -m pip install -r requirements.txt
Ignoring pyreadline: markers 'platform_system == "Windows"' don't match your environment
Collecting requests>=2.23.0
  Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting PyYAML>=5.1.2
  Downloading PyYAML-5.3.1.tar.gz (269 kB)
     |████████████████████████████████| 269 kB 1.2 MB/s 
Processing /home/mnowak/.cache/pip/wheels/78/2e/56/cd3a01e5f7457757effe1a2b10ce771c1ae94ea769414359de/gql-3.0.0a4-py2.py3-none-any.whl
Requirement already satisfied: chardet<4,>=3.0.2 in ./ai-dungeon-cli-venv/lib/python3.8/site-packages (from requests>=2.23.0->-r requirements.txt (line 1)) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./ai-dungeon-cli-venv/lib/python3.8/site-packages (from requests>=2.23.0->-r requirements.txt (line 1)) (1.25.8)
Requirement already satisfied: certifi>=2017.4.17 in ./ai-dungeon-cli-venv/lib/python3.8/site-packages (from requests>=2.23.0->-r requirements.txt (line 1)) (2019.11.28)
Requirement already satisfied: idna<3,>=2.5 in ./ai-dungeon-cli-venv/lib/python3.8/site-packages (from requests>=2.23.0->-r requirements.txt (line 1)) (2.8)
Collecting yarl<1.6,>=1.4
  Using cached yarl-1.5.1-cp38-cp38-manylinux1_x86_64.whl (262 kB)
Collecting graphql-core<3.2,>=3.1
  Using cached graphql_core-3.1.2-py3-none-any.whl (183 kB)
Collecting multidict>=4.0
  Using cached multidict-5.0.0-cp38-cp38-manylinux2014_x86_64.whl (159 kB)
Building wheels for collected packages: PyYAML
  Building wheel for PyYAML (setup.py) ... done
  Created wheel for PyYAML: filename=PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl size=44617 sha256=7b7b5b0555db0808282546d628c8ac8da3b5dd37d50808c11d3986af08658d24
  Stored in directory: /home/mnowak/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c
Successfully built PyYAML
Installing collected packages: requests, PyYAML, multidict, yarl, graphql-core, gql
  Attempting uninstall: requests
    Found existing installation: requests 2.22.0
    Uninstalling requests-2.22.0:
      Successfully uninstalled requests-2.22.0
Successfully installed PyYAML-5.3.1 gql-3.0.0a4 graphql-core-3.1.2 multidict-5.0.0 requests-2.24.0 yarl-1.5.1
(ai-dungeon-cli-venv) mnowak@L5110:~/ai-dungeon-cli$ ./ai_dungeon_cli/__init__.py
Traceback (most recent call last):
  File "./ai_dungeon_cli/__init__.py", line 6, in <module>
    from gql import gql, Client, WebsocketsTransport
ImportError: cannot import name 'WebsocketsTransport' from 'gql' (/home/mnowak/ai-dungeon-cli/ai-dungeon-cli-venv/lib/python3.8/site-packages/gql/__init__.py)
(ai-dungeon-cli-venv) 

As for the second error sorry I didn't see there was an already existing issue! Id be happy to try again once you are able to work with the API once more, I can close this one if you like?

from ai-dungeon-cli.

p3r7 avatar p3r7 commented on July 26, 2024

I didn't see there was an already existing issue!

That's comprehensible, the title of the other ticket doesn't reflect this new issue.

I can close this one if you like?

No, your last test proved that there is indeed an issue with gql-3.0.0a4 to this ticket is legitimate.

I'll just rename it.

I've just checked and it seems that we use a >= instead of a == (setup.py, requirements.txt). That's certainly the reason why pip takes the right to use a newer version (with a BC break obviously).

from ai-dungeon-cli.

p3r7 avatar p3r7 commented on July 26, 2024

GQL version issue fixed for current with f311141.

Would ideally need a new release / tag but that'll certainly wait for the adaptation to newest API changes (the "stamina" update).

from ai-dungeon-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.