internetarchive icon indicating copy to clipboard operation
internetarchive copied to clipboard

ia configure fails

Open ghost opened this issue 9 months ago • 6 comments

Hi - i'm getting an error when I try to configure ia. I tried running this three different ways (with the version installed through apt, with the binary downloaded following the instructions in the readme, and through pipx) and got the same error every time.

My internet connection works: I'm able to access internetarchive through curl, and when I type an incorrect password it tells me "error: Account not found, check your email and try again."

Here's the error I'm getting:

~/.local/bin/ia configure Enter your Archive.org credentials below to configure 'ia'.

Email address: {my email} Password: Traceback (most recent call last): File "/home/chris/.local/share/pipx/venvs/internetarchive/lib/python3.12/site-packages/requests/models.py", line 974, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/chris/.local/bin/ia", line 8, in sys.exit(main()) ^^^^^^ File "/home/chris/.local/share/pipx/venvs/internetarchive/lib/python3.12/site-packages/internetarchive/cli/ia.py", line 146, in main args.func(args) File "/home/chris/.local/share/pipx/venvs/internetarchive/lib/python3.12/site-packages/internetarchive/cli/ia_configure.py", line 102, in main config_file_path = configure(args.username, ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/chris/.local/share/pipx/venvs/internetarchive/lib/python3.12/site-packages/internetarchive/api.py", line 556, in configure auth_config = config_module.get_auth_config( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/chris/.local/share/pipx/venvs/internetarchive/lib/python3.12/site-packages/internetarchive/config.py", line 47, in get_auth_config j = r.json() ^^^^^^^^ File "/home/chris/.local/share/pipx/venvs/internetarchive/lib/python3.12/site-packages/requests/models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

ghost avatar Mar 08 '25 03:03 ghost

I'm having trouble replicating this issue, are you still having problems? I'm wondering if it was transient.

jjjake avatar Mar 11 '25 18:03 jjjake

Thanks for checking! I just tried again and got the same error. In case it helps, I'm on Welcome to Ubuntu 24.04.2 LTS and ia --version gives 5.2.1. Happy to provide more diagnostic info if helpful.

But no worries if this is just a me issue. It turned out that I didn't get to login to get the files I was looking for, so I did not need to run ia configure, and I was able to use ia download without any issues.

ghost avatar Mar 11 '25 20:03 ghost

@jjjake I suspect #690 is related - I was able to reproduce 403s with funny looking strings in password.

@cmj7gh - I have a feeling you're using a password manager which is great! My guess is you've used a set of random characters that can match a security filter. Would you be willing to change your password and try again?

And while you absolutely shouldn't give passwords to random people over the Internet, feel free to also share your old password so we could confirm it was hitting some filter - but no obligation :-)

leee avatar Mar 27 '25 00:03 leee

Hi @leee - you're right that I'm using a password manager. I just rotated my password and I've never used the old one on any other website, so I'm comfortable sharing my old one:

sNCX2QtXF1GQ

No special characters there!

cj0ne5 avatar Mar 27 '25 10:03 cj0ne5

Alas, doesn't look like a problematic string, and I was not able to reproduce using your password. #690 is still a problem for those with complex passwords, but a red herring for your situation. Thank you for indulging me though!

Have you since been able to successfully login with ia configure with the new password? If the issue persists, perhaps your email as a string is hitting some filters.

leee avatar Mar 27 '25 12:03 leee

I had this issue with

uBQQt4!YyW~3Wq\6`+*lwd~7g

password, change it to long alpha-numeric one and it disappeared.

danielwerg avatar Jul 23 '25 10:07 danielwerg