Eigenbahn / ai-dungeon-cli

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

auth_token not working #24

Closed xero-lib closed 3 years ago

xero-lib commented 3 years ago

When I console.log(window.localStorage), I get the accessToken which I copy-paste into $HOME/.config/ai-dongeon-cli/config.yml file as auth_token: 'my auth token here'. When I run it, I get the following error:


 ▄▄▄       ██▓   ▓█████▄  █    ██  ███▄    █   ▄████ ▓█████  ▒█████   ███▄    █
▒████▄    ▓██▒   ▒██▀ ██▌ ██  ▓██▒ ██ ▀█   █  ██▒ ▀█▒▓█   ▀ ▒██▒  ██▒ ██ ▀█   █
▒██  ▀█▄  ▒██▒   ░██   █▌▓██  ▒██░▓██  ▀█ ██▒▒██░▄▄▄░▒███   ▒██░  ██▒▓██  ▀█ ██▒
░██▄▄▄▄██ ░██░   ░▓█▄   ▌▓▓█  ░██░▓██▒  ▐▌██▒░▓█  ██▓▒▓█  ▄ ▒██   ██░▓██▒  ▐▌██▒
 ▓█   ▓██▒░██░   ░▒████▓ ▒▒█████▓ ▒██░   ▓██░░▒▓███▀▒░▒████▒░ ████▓▒░▒██░   ▓██░
 ▒▒   ▓▒█░░▓      ▒▒▓  ▒ ░▒▓▒ ▒ ▒ ░ ▒░   ▒ ▒  ░▒   ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▒░   ▒ ▒
  ▒   ▒▒ ░ ▒ ░    ░ ▒  ▒ ░░▒░ ░ ░ ░ ░░   ░ ▒░  ░   ░  ░ ░  ░  ░ ▒ ▒░ ░ ░░   ░ ▒░
  ░   ▒    ▒ ░    ░ ░  ░  ░░░ ░ ░    ░   ░ ░ ░ ░   ░    ░   ░ ░ ░ ▒     ░   ░ ░
      ░  ░ ░        ░       ░              ░       ░    ░  ░    ░ ░           ░
                  ░

Unexpected response from API backend:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/__init__.py", line 585, in main
    ai_dungeon.choose_config()
  File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/__init__.py", line 318, in choose_config
    r.raise_for_status()
  File "/usr/lib/python3.8/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://ai-dungeon-api.herokuapp.com/scenario/362833/options

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/ai-dungeon-cli", line 33, in <module>
    sys.exit(load_entry_point('ai-dungeon-cli==0.3.1.dev0+git.0bef6eeb.dirty', 'console_scripts', 'ai-dungeon-cli')())
  File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/__init__.py", line 611, in main
    term_io.handle_basic_output(err)
  File "/usr/lib/python3.8/site-packages/ai_dungeon_cli/__init__.py", line 77, in handle_basic_output
    print("\n".join(textwrap.wrap(text, self.get_width())))
  File "/usr/lib/python3.8/textwrap.py", line 379, in wrap
    return w.wrap(text)
  File "/usr/lib/python3.8/textwrap.py", line 351, in wrap
    chunks = self._split_chunks(text)
  File "/usr/lib/python3.8/textwrap.py", line 337, in _split_chunks
    text = self._munge_whitespace(text)
  File "/usr/lib/python3.8/textwrap.py", line 154, in _munge_whitespace
    text = text.expandtabs(self.tabsize)
AttributeError: 'HTTPError' object has no attribute 'expandtabs'
p3r7 commented 3 years ago

Hi there.

The API backend for AI Dungeon went through several complete overhaul and we voluntarily waited for stuff to stabilize.

So right now this project is sadly not working due to API incompatibilities.

See https://github.com/Eigenbahn/ai-dungeon-cli/issues/23 for more details.