mlco2 / mlco2/codecarbon

Incorrect argument in codecarbone causing error in get_project_data

Open
#410 5 comments 0 reactions 2 assignees View on GitHub

@vivek41-glitch is already working on this.

Since May 1, 2026.

bug good first issue
Dominant language
Python
Stars
1.9k
Forks
323
Avg merge
1d 12h
Merged PRs (30d)
12

Description

  • CodeCarbon version: "^2.2.1"
  • Python version: 3.10
  • Operating System: Windows 11
Description

I encountered an error while working with the codecarbone library. The issue arises in the file "data.py" at line 20, specifically in the get_project_data function. The original code uses the argument "rows" in the to_dict method, which results in a runtime error. To resolve the issue, I replaced "rows" with "records".

File "C:\Users\my.name\AppData\Local\pypoetry\Cache\virtualenvs\analyser-f8dLQ06Q-py3.10\lib\site-packages\codecarbon\viz\data.py", line 20, in get_project_data
project_data = project_df.to_dict("rows")

What I Did
poetry run carbonboard --filepath="./emissions.csv" --port=3333

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.