anmol098 / waka-readme-stats

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

BUG max() arg is an empty sequence #522

Open dappsar opened 1 month ago

dappsar commented 1 month ago

Describe the bug From one day to the next, it stopped working with the following error:

  File "/waka-readme-stats/main.py", line 230, 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 217, in main
    stats = await get_stats()
            ^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/main.py", line 193, in get_stats
    stats += f"{make_language_per_repo_list(repositories)}\n\n"
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/waka-readme-stats/graphics_list_formatter.py", line 141, in make_language_per_repo_list
    top_language = max(list(language_count.keys()), key=lambda x: language_count[x]["count"])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence
sys:1: RuntimeWarning: coroutine 'AsyncClient.get' was never awaited```

There were no changes to the readme or GitHub action until I detected the error, at which point I started testing different options, but with no positive results.

Github repository link https://github.com/dappsar/dappsar

Additional context It was working until last week.

beatrizsmerino commented 1 month ago

Captura de pantalla 2024-08-19 a las 15 33 25 I think I have the same issue