Eigenbahn / ai-dungeon-cli

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

error message at launch #34

Closed legeekmetalleux closed 3 years ago

legeekmetalleux commented 3 years ago

I cannot launch application I have this error message ( i use archlinux)

Traceback (most recent call last): File "/usr/bin/ai-dungeon-cli", line 33, in sys.exit(load_entry_point('ai-dungeon->cli==0.4.5.dev7+git.bda573cb.dirty', 'console_scripts', 'ai-dungeon-cli'()) File /usr/bin/ai-dungeon-cli", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/usr/lib/python3.8/importlib/init.py", line 127, in >import_module return _bootstrap._gcd_import(name[level:], package, level) File "frozen importlib._bootstrap>", line 1014, in _gcd_import File "frozen importlib._bootstrap>", line 991, in _find_and_load File "frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked File "frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "frozen importlib._bootstrap>", line 1014, in _gcd_import File "frozen importlib._bootstrap>", line 991, in _find_and_load File "frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "frozen importlib._bootstrap>", line 671, in _load_unlocked File "frozen importlib._bootstrap_external>", line 783, in exec_module File "frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/init.py", line 6, in module> from gql import gql, Client, WebsocketsTransport ImportError: cannot import name 'WebsocketsTransport' from 'gql' (/usr/lib/python3.8/site-packages/gql/init.py)

sorry for my english i don't speak english it's google translation

legeekmetalleux commented 3 years ago

the message have change Traceback (most recent call last): File "/usr/bin/ai-dungeon-cli", line 33, in <module> sys.exit(load_entry_point('ai-dungeon-cli==0.4.5', 'console_scripts', 'ai-dungeon-cli')()) File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/__init__.py", line 356, in main ai_dungeon.make_user_choose_config() File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/__init__.py", line 177, in make_user_choose_config prompt, settings = self.api.get_options(self.api.single_player_mode_id) File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/impl/api/client.py", line 119, in get_options result = self._execute_query(''' File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/impl/api/client.py", line 32, in _execute_query return self.gql_client.execute(gql(query), variable_values=params) File "/home/max/.local/lib/python3.8/site-packages/gql/client.py", line 120, in execute data: Dict[Any, Any] = loop.run_until_complete( File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/max/.local/lib/python3.8/site-packages/gql/client.py", line 99, in execute_async return await session.execute(document, *args, **kwargs) File "/home/max/.local/lib/python3.8/site-packages/gql/client.py", line 342, in execute raise TransportQueryError(str(result.errors[0]), errors=result.errors) gql.transport.exceptions.TransportQueryError: {'message': 'Cannot query field "content" on type "Query". Did you mean "comments"?', 'locations': [{'line': 7, 'column': 3}], 'extensions': {'code': 'INTERNAL_SERVER_ERROR'}}

p3r7 commented 3 years ago

Hi.

Maybe should I make the message more visible but this script is not working as of writing:

image

It stopped working with API changes that came alongside the introduction of the stamina system (so that's very recent).

We'll eventually adapt to these API changes, but by experience when changes happen to their API, they tend to span over 2/3 weeks. So it's safer to wait a bit instead of trying to keep up with every change they'll introduce every few day.

patrickjm commented 3 years ago

Any update? Would love to use this lib - but also willing to just try running the site in selenium if you're busy.

p3r7 commented 3 years ago

Yeah, I’ve been quite busy.

I don’t even know if they shipped more drastic updates since the introduction of the stamina system.

I don’t know if the selenium approach would be more perennial or even much faster to implement.