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

BUG: Action fails #443

Closed
lgc2333 opened this issue Apr 4, 2023 · 6 comments · May be fixed by #449
Closed

BUG: Action fails #443

lgc2333 opened this issue Apr 4, 2023 · 6 comments · May be fixed by #449
Assignees
Labels
bug Something isn't working

Comments

@lgc2333
Copy link

lgc2333 commented Apr 4, 2023

No description provided.

@lgc2333 lgc2333 added the bug Something isn't working label Apr 4, 2023
@lgc2333
Copy link
Author

lgc2333 commented Apr 5, 2023

action file
https://github.com/lgc2333/lgc2333/blob/main/.github/workflows/main.yml

name: Waka Readme

on:
  schedule:
    - cron: '0 8 * * *'
  workflow_dispatch:
jobs:
  update-readme:
    name: Update Readme with Metrics
    runs-on: ubuntu-latest
    steps:
      - uses: anmol098/waka-readme-stats@master
        with:
          WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          SHOW_UPDATED_DATE: "True"
          SHOW_LINES_OF_CODE: "True"

gh token perms
image

confirmed all tokens in workflow are not expired

@lgc2333
Copy link
Author

lgc2333 commented Apr 5, 2023

action log
https://github.com/lgc2333/lgc2333/actions/runs/4616295581/jobs/8161128592

Traceback (most recent call last):
  File "/waka-readme-stats/main.py", line 221, in <module>
    run(main())
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 208, in main
    stats = await get_stats()
            ^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 153, in get_stats
    repositories = await collect_user_repositories()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 1[32](https://github.com/lgc2333/lgc2333/actions/runs/4616295581/jobs/8161128592#step:3:33), in collect_user_repositories
    repo_names = [repo["name"] for repo in repositories["data"]["user"]["repositories"]["nodes"]]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 132, in <listcomp>
    repo_names = [repo["name"] for repo in repositories["data"]["user"]["repositories"]["nodes"]]
                  ~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

@pseusys
Copy link
Collaborator

pseusys commented Apr 5, 2023

Run it with debug logs, please

@lgc2333
Copy link
Author

lgc2333 commented Apr 5, 2023

@pseusys
Copy link
Collaborator

pseusys commented Apr 6, 2023

@lgc2333 Please, take a look at my comment here: the field is different, but the situation is similar, name is also a not nullable field.

@lgc2333
Copy link
Author

lgc2333 commented Apr 6, 2023

@lgc2333 Please, take a look at my comment here: the field is different, but the situation is similar, name is also a not nullable field.

thanks!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants