Closed Nocxr closed 3 years ago
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: https://github.com/Eigenbahn/ai-dungeon-cli/issues/29#issuecomment-722294824
We need to re-do inspection / reveng to re-adapt the code. That's just the 4th time this happens.
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?
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).
GQL version issue fixed for current with https://github.com/Eigenbahn/ai-dungeon-cli/commit/f3111417229db54adf8c5b913625060e7dd0b3af.
Would ideally need a new release / tag but that'll certainly wait for the adaptation to newest API changes (the "stamina" update).
When using "python3 -m pip install ai-dungeon-cli" method OR installing from source, pip is installing the "gql-3.0.0a4" package automatically, resulting in the following error:
If I remove that package and manually install gql-3.0.0a1, a2, or a3 I am getting this error:
Installed packages:
I see it referencing a config of some sort but from reading the repo information I believed the config was optional? I'm not sure if that is related or not to this so I apologize if the error is something simple I missed. Please let me know if you would like me to run anything or provide any other information, thanks!