Eigenbahn / ai-dungeon-cli

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

Does not load even though dependencies are satisfied #2

Closed Moire9 closed 4 years ago

Moire9 commented 4 years ago

Hello. I installed the program and have python 3.5.2 & requests library installed, however, starting up the program gives an error:

Traceback (most recent call last):
    File "/usr/local/bin/ai-dungeon-cli", line 18, in <module>
        cfg = yaml.load(cfg_raw, Loader=yaml.FullLoader)
AttributeError: module 'yaml' has no attribute 'FullLoader'

It appears that there is an error with the yaml package. However, pip3 doesn't want to install yaml, as it doesn't appear to be a package that can be installed, so it's probably a python-inbuilt package like math. Does anyone know what might be causing this?

bdavs commented 4 years ago

@SirNapkin1334 the pip package is called pyyaml

bdavs commented 4 years ago

5

This PR should solve this issue

p3r7 commented 4 years ago

Merged https://github.com/Eigenbahn/ai-dungeon-cli/pull/5, issue should be solved.

Moire9 commented 4 years ago

It didn't work, until I deleted the pyyaml and reinstalled it (it appears that the distro-installed pyyaml was broken).

p3r7 commented 4 years ago

It might be due to older versions not accepting a secondary argument for load().

I'm waiting for final edits to https://github.com/Eigenbahn/ai-dungeon-cli/pull/4 in order to merge and will then tackle this issue.

It's only a matter of precising the version in requirements.txt.

For information, here is the version I've got on my system:

$ pip freeze | grep -i yaml
PyYAML==5.1.2
p3r7 commented 4 years ago

Should be fixed by https://github.com/Eigenbahn/ai-dungeon-cli/commit/e16b8af29a28852c252f2031710c6e24cc81c8dc (+ https://github.com/Eigenbahn/ai-dungeon-cli/commit/f253c374e06668f37d687a70fce7b91c215899be).

Moire9 commented 4 years ago

Yes, the new installation system fixed it. However, I have a new error, it appears to be in the code: user_input has no method starts_with. I will make a PR to fix this.

Moire9 commented 4 years ago

Edit: looks like it's fixed in the newest comment, nevermind about the PR.