mlco2 / mlco2/codecarbon

SyntaxError codecarbon/core/api_client.py line 117

Open
#716 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • CodeCarbon version: 2.7.4
Description

after installing the last version of codecarbon my script is running into issues due to a syntax error in api_client.py file, line 117:
if organization := self.check_organization_exists(organization_name):

To be able to run my script I just replaced ":" by "=". I am unsure why it worked in previous runs, now it is complaining about it. But, yeah, the syntax is wrong.

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.

Research direction

Open codecarbon/core/api_client.py at line 117 and reproduce the reported syntax error using the supported Python environment. Check that the file parses successfully and verify that the API client still works after the syntax issue is corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.