waka-readme-stats icon indicating copy to clipboard operation
waka-readme-stats copied to clipboard

Exception Occurred 'stats'

Open rad182 opened this issue 1 year ago • 0 comments

Describe the bug Exception Occurred 'stats'

Traceback (most recent call last):
[27](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:28)
  File "/main.py", line 566, in <module>
[28](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:29)
    waka_stats = get_stats(g)
[29](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:30)
  File "/main.py", line 480, in get_stats
[30](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:31)
    yearly_data = get_yearly_data()
[31](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:32)
  File "/main.py", line 420, in get_yearly_data
[32](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:33)
    yearly_data = loc.calculateLoc()
[33](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:34)
  File "/loc.py", line 32, in calculateLoc
[34](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:35)
    self.getCommitStat(repo['node'], yearly_data)
[35](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:36)
  File "/loc.py", line 89, in getCommitStat
[36](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:37)
    yearly_data[curr_year][quarter][repoDetails['primaryLanguage']['name']] += (individualCommitResult["stats"]["additions"] - individualCommitResult["stats"]['deletions'])
[37](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:38)
KeyError: 'stats'
[38](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:39)
Username rad182
[39](https://github.com/rad182/rad182/actions/runs/3047528675/jobs/4911612157#step:3:40)
Exception Occurred 'stats'

To Reproduce

  1. run the action

Config

name: Waka Readme

on:
  schedule:
    # Runs at 12am IST
    - cron: '30 18 * * *'
  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_OS: "True"
          SHOW_PROJECTS: "False"
          SHOW_PROFILE_VIEWS: "False"
          SHOW_LANGUAGE_PER_REPO: "True"
          SHOW_TOTAL_CODE_TIME: "True"
          SHOW_LINES_OF_CODE: "True"
          SHOW_SHORT_INFO: "True"

rad182 avatar Sep 14 '22 03:09 rad182