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

Exception Occurred 'stats' #328

Closed
rad182 opened this issue Sep 14, 2022 · 1 comment
Closed

Exception Occurred 'stats' #328

rad182 opened this issue Sep 14, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rad182
Copy link

rad182 commented Sep 14, 2022

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 rad182 added the bug Something isn't working label Sep 14, 2022
@MarkenJaden MarkenJaden assigned MarkenJaden and unassigned anmol098 Jan 16, 2023
@MarkenJaden
Copy link
Collaborator

Hey,

thanks for your issue and the good explanation.
Does the error still occur? Probably it was related to bug #346 and was fixed recently.

At least the timestamp in your personal readme is up to date and you are using all the features in your workflow that you included here.

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

No branches or pull requests

3 participants