TypeError: 'NoneType' object is not subscriptable sys:1: RuntimeWarning: coroutine 'AsyncClient.get' was never awaited
Snailedlt opened this issue · comments
Jørgen Kalsnes Hagen commented
My waka-readme job failed today due to a TypeError. After re-running it worked fine, but maybe there is an underlying issue here so I'll post the issue anyways :)
Action run: https://github.com/Snailedlt/Snailedlt/actions/runs/5422855494/jobs/9860032571
Error log:
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 156, in get_stats
yearly_data, commit_data = await calculate_commit_data(repositories)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/waka-readme-stats/yearly_commit_calculator.py", line [38](https://github.com/Snailedlt/Snailedlt/actions/runs/5422855494/jobs/9860032571#step:3:39), in calculate_commit_data
await update_data_with_commit_stats(repo, yearly_data, date_data)
File "/waka-readme-stats/yearly_commit_calculator.py", line 65, in update_data_with_commit_stats
for commit in commit_data["data"]["repository"]["ref"]["target"]["history"]["nodes"]:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
sys:1: RuntimeWarning: coroutine 'AsyncClient.get' was never awaited
Yozachar commented
Hi @Snailedlt you're using a different project https://github.com/anmol098/waka-readme-stats.
Feel free to checkout https://github.com/athul/waka-readme, which follows a minimalist approach.
Jørgen Kalsnes Hagen commented
My bad, thanks for the link