Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError codecarbon/core/api_client.py line 117 #716

Open
3rickfs opened this issue Nov 19, 2024 · 1 comment
Open

SyntaxError codecarbon/core/api_client.py line 117 #716

3rickfs opened this issue Nov 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@3rickfs
Copy link

3rickfs commented Nov 19, 2024

  • 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.

@benoit-cty
Copy link
Contributor

Hi, thanks for reporting your issue!

The walrus operator := exist since Python 3.8. Are you using Python 3.7 ?

Please note that 3.7 and 3.8 are deprecated : https://devguide.python.org/versions/

By the way, we are finalizing the new API usage, and so you may have problems using it. The new web interface is not in production.

The standalone package with output CSV is supposed to works fine. But maybe no more in Python 3.7 if I understand your problem.

@benoit-cty benoit-cty added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants