Lynnesbian / Lynnesbian/OCRbot
login.py fails with Plerom after secret is entered
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 71
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
After copying the secret over from Pleroma to command line where I started login.py I get this error:
Traceback (most recent call last):
File "/home/utzer/.local/lib/python3.10/site-packages/mastodon/Mastodon.py", line 525, in log_in
response = self.__api_request('POST', '/oauth/token', params, do_ratelimiting=False)
File "/home/utzer/.local/lib/python3.10/site-packages/mastodon/Mastodon.py", line 3425, in __api_request
raise ex_type(
mastodon.Mastodon.MastodonAPIError: ('Mastodon API returned error', 400, 'Bad Request', 'Invalid credentials')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/utzer/ocrbot/login.py", line 66, in <module>
cfg['secret'] = client.log_in(code=input("Secret: "), scopes=scopes)
File "/home/utzer/.local/lib/python3.10/site-packages/mastodon/Mastodon.py", line 533, in log_in
raise MastodonIllegalArgumentError('Invalid access token or redirect_uris: %s' % e)
mastodon.Mastodon.MastodonIllegalArgumentError: Invalid access token or redirect_uris: ('Mastodon API returned error', 400, 'Bad Request', 'Invalid credentials')
Wondering if there is any tip why the connection fails.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at login.py line 66 and compare the arguments passed to the Mastodon client’s log_in call with the Mastodon.py traceback. Reproduce the login flow using the copied secret, then determine why the API reports invalid credentials or redirect_uris. Done means the cause and required configuration are documented, or login succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100