waka-readme-stats: BUG TypeError: 'View' object is not subscriptable

Describe the bug

##[debug]Evaluating condition for step: 'Run anmol098/waka-readme-stats@master'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run anmol098/waka-readme-stats@master
##[debug]Loading inputs
##[debug]Evaluating: secrets.WAKATIME_API_KEY
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'WAKATIME_API_KEY'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: secrets.GH_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GH_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: runner.debug
##[debug]Evaluating Index:
##[debug]..Evaluating runner:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'debug'
##[debug]=> '1'
##[debug]Result: '1'
##[debug]Loading env
Run anmol098/waka-readme-stats@master
/usr/bin/docker run --name wakareadmestatswakareadmestatsmaster_b50318 --label 118851 --workdir /github/workspace --rm -e "INPUT_WAKATIME_API_KEY" -e "INPUT_GH_TOKEN" -e "INPUT_SHOW_PROJECTS" -e "INPUT_SECTION_NAME" -e "INPUT_PULL_BRANCH_NAME" -e "INPUT_PUSH_BRANCH_NAME" -e "INPUT_SHOW_OS" -e "INPUT_SHOW_EDITORS" -e "INPUT_SHOW_TIMEZONE" -e "INPUT_SHOW_COMMIT" -e "INPUT_SHOW_LANGUAGE" -e "INPUT_SHOW_LINES_OF_CODE" -e "INPUT_SHOW_LANGUAGE_PER_REPO" -e "INPUT_SHOW_LOC_CHART" -e "INPUT_SHOW_DAYS_OF_WEEK" -e "INPUT_SHOW_PROFILE_VIEWS" -e "INPUT_SHOW_SHORT_INFO" -e "INPUT_SHOW_UPDATED_DATE" -e "INPUT_SHOW_TOTAL_CODE_TIME" -e "INPUT_COMMIT_BY_ME" -e "INPUT_COMMIT_MESSAGE" -e "INPUT_COMMIT_USERNAME" -e "INPUT_COMMIT_EMAIL" -e "INPUT_COMMIT_SINGLE" -e "INPUT_LOCALE" -e "INPUT_UPDATED_DATE_FORMAT" -e "INPUT_IGNORED_REPOS" -e "INPUT_SYMBOL_VERSION" -e "INPUT_DEBUG_LOGGING" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_DEBUG" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/eric-cerio/eric-cerio":"/github/workspace" wakareadmestats/waka-readme-stats:master
Program execution started at 03-06-[2](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:2)025 01:22:44:156087.
Current user: eric-cerio.
Managers initialized.
Collecting stats for README...
Getting user repositories list...
	User repository list collected!
	User contributed to repository list collected!
Calculating commit data...
	1/19 Retrieving repo: [private]
	2/19 Retrieving repo: [private]
	[3](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:3)/19 Retrieving repo: eric-cerio/CrunkTimer
	[4](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:4)/19 Retrieving repo: [private]
	[5](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:5)/19 Retrieving repo: eric-cerio/me
		Skipping repo.
	[6](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:6)/19 Retrieving repo: eric-cerio/BasicCodelab
	7/19 Retrieving repo: eric-cerio/BasicStateCodelab
	8/19 Retrieving repo: eric-cerio/eric-cerio
	9/19 Retrieving repo: [private]
	10/19 Retrieving repo: eric-cerio/racetimer
	11/19 Retrieving repo: [private]
	12/19 Retrieving repo: [private]
	13/19 Retrieving repo: [private]
	14/19 Retrieving repo: [private]
	15/19 Retrieving repo: [private]
	16/19 Retrieving repo: [private]
	1[7](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:7)/19 Retrieving repo: [private]
	1[8](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:8)/19 Retrieving repo: eric-cerio/tsytotaltechsolutions
		Skipping repo.
	1[9](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:9)/19 Retrieving repo: eric-cerio/TSY
		Skipping repo.
Commit data calculated!
Adding total code time info...
	Making a remote API query named 'waka_all'...
	Query 'waka_all' finished, result saved!
Adding profile views info...
Traceback (most recent call last):
  File "/waka-readme-stats/main.py", line 231, in <module>
    run(main())
  File "/usr/local/lib/python3.[11](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3: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 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 218, in main
    stats = await get_stats()
            ^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line [17](https://github.com/eric-cerio/eric-cerio/actions/runs/15400236473/job/43349687574#step:3:17)9, in get_stats
    stats += f"![Profile Views](http://img.shields.io/badge/{quote(FM.t('Profile Views'))}-{data['count']}-blue)\n\n"
                                                                                            ~~~~^^^^^^^^^
TypeError: 'View' object is not subscriptable
sys:1: RuntimeWarning: coroutine 'AsyncClient.get' was never awaited
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Run anmol098/waka-readme-stats@master

To Reproduce Steps to reproduce the behavior:

  1. Run the waka-readme-stats

Expected behavior Success

Github repository link https://github.com/eric-cerio/eric-cerio

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 6
  • Comments: 17 (2 by maintainers)

Commits related to this issue

Most upvoted comments

This version of PyGithub will be downgraded until we can implement a solution for this.

Looks like I was dumb enough not to read the changelogs of the updated dependencies 🤦.

This issue only occurs when SHOW_PROFILE_VIEWS is set to “True” or you didn’t set it on the workflow.

As a temporary workaround, you can set SHOW_PROFILE_VIEWS: “false” and everything should work as expected.

It seems the bug is related to how the code handles retrieving the profile view count.

This version of PyGithub will be downgraded until we can implement a solution for this.

I also encountered the same issue