anmol098 / waka-readme-stats

This GitHub action helps to add cool dev metrics to your github profile Readme
MIT License
3.39k stars 555 forks source link

BUG: Action fails #443

Closed lgc2333 closed 1 year ago

lgc2333 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Run it with debug logs, please

lgc2333 commented 1 year ago

sorryyyyy...

debug log here https://github.com/lgc2333/lgc2333/actions/runs/4616295581/jobs/8162022815

pseusys commented 1 year ago

@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 commented 1 year ago

@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!!!!