interviewstreet / ghs

Cross-platform CLI tool to generate your Github profile's stats and summary.
137 stars 88 forks source link

`ghs` not working #19

Closed ratika-12 closed 2 years ago

ratika-12 commented 2 years ago

Running ghs -u ratika-12 throws:

Error: Query failed with status code: 401
Traceback: 
  File "/Users/ratikaswami/ghs/venv/lib/python3.8/site-packages/ghs/ghs.py", line 293, in main_proxy
    main()
  File "/Users/ratikaswami/ghs/venv/lib/python3.8/site-packages/ghs/ghs.py", line 267, in main
    verify_github_username(args.username)
  File "/Users/ratikaswami/ghs/venv/lib/python3.8/site-packages/ghs/ghs.py", line 33, in verify_github_username
    if fetch_user_id(username) is None:
  File "/Users/ratikaswami/ghs/venv/lib/python3.8/site-packages/ghs/fetchers.py", line 129, in fetch_user_id
    raise Exception(f"Query failed with status code: {request.status_code}")
makkoncept commented 2 years ago

Hi @ratika-12, this command is working for me:

image

Seems like a problem with the github PAT in your case. Can you create a new PAT (make sure to give it the scopes mentioned here). After that, update the token in ghs by running the command ghs -t (it will prompt you for the new token).

makkoncept commented 2 years ago

Closing this. Let me know if you have any questions @ratika-12.