Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

headspace login throws IndexError #12

Open
kswang2400 opened this issue Mar 19, 2022 · 4 comments
Open

headspace login throws IndexError #12

kswang2400 opened this issue Mar 19, 2022 · 4 comments

Comments

@kswang2400
Copy link

trying to login with headspace login

│ /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyheadspace/auth.p │
│ y:54 in get_bearer_token                                                                         │
│                                                                                                  │
│   51 │   }                                                                                       │
│   52 │   response = session.get(BEARER_TOKEN_URL, params=params)                                 │
│   53 │   html = response.text                                                                    │
│ ❱ 54 │   bearer_token = re.findall(r'"access_token":"(.+?)"', html)[0]                           │
│   55 │   return bearer_token                                                                     │
│   56                                                                                             │
│   57                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range
@yashrathi-git
Copy link
Owner

yashrathi-git commented Mar 19, 2022

Hi @kswang2400, I am unable to replicate this. Could you share the full traceback.
Also you could try to log in manually by following this.

Are you using login with google or some other 3rd party login service?

@taladro
Copy link

taladro commented Oct 25, 2023

Hi I edited bearer_id.txt but now I still get a login error

Unautorized : Unable to login to headspace account
Run headspace login first.

btw the typo

Is there any step I must do to get the program to use the token? it´s the correct one (from request and not response).

thanks

@taladro
Copy link

taladro commented Oct 25, 2023

Hi I edited bearer_id.txt but now I still get a login error

Unautorized : Unable to login to headspace account Run headspace login first.

btw the typo

Is there any step I must do to get the program to use the token? it´s the correct one (from request and not response).

thanks

I reply to myself so it can help someone in the future. You must include the word Bearer on the copied content.

@ynfle
Copy link
Contributor

ynfle commented Feb 8, 2024

Hi I edited bearer_id.txt but now I still get a login error
Unautorized : Unable to login to headspace account Run headspace login first.
btw the typo
Is there any step I must do to get the program to use the token? it´s the correct one (from request and not response).
thanks

I reply to myself so it can help someone in the future. You must include the word Bearer on the copied content.

Thank you @taladro!!! This helped me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants