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

cannot create a new project #680

Open
robitaillej opened this issue Oct 2, 2024 · 1 comment
Open

cannot create a new project #680

robitaillej opened this issue Oct 2, 2024 · 1 comment
Labels
API Concern only the codecarbon API bug Something isn't working Dashboard design dash python

Comments

@robitaillej
Copy link

  • CodeCarbon version: v2.7.1
  • Python version: 3.12.3
  • Operating System: windows

Description

I'm trying to setup codecarbon for a project (the machine is Windows, but it runs in a docker container). I used pip to install it. When in the prompt after executing codecarbon config , I tried setting up a new project under the organization "Community organization". But it crashes since the project doesnt seem to have been created.
Is it because I try to use https://api.codecarbon.io/ as the API endpoint? Would it be different if I was running a codecarbon instance locally?
And I should mentionned I got the same kind of errors when trying to create a new organization. I should also mention that unlike what the doc says, codecarbon init is not a valid command.

What I Did

Here is the full interaction I had with the prompt, followed by the error traceback. Thanks for your help!

codecarbon config
Welcome to CodeCarbon configuration wizard
Creating new config file
Where do you want to put your config file ? [~/.codecarbon.config]: /workspaces/bd-goelette/harvester/.codecarbon.config
Config file created at /workspaces/bd-goelette/harvester/.codecarbon.config
Current API endpoint is https://api.codecarbon.io. Press enter to continue or input other url [https://api.codecarbon.io]: 
? Pick existing organization from list or Create new organization ? Community organization
[codecarbon ERROR @ 13:14:03] ApiClient Error when calling the API on https://api.codecarbon.io/organizations/e52fe339-164d-4c2b-a8c0-f562dfce066d/projects
[codecarbon ERROR @ 13:14:03] ApiClient API return http code 404 and answer : {"detail":"Not Found"}
? Pick existing project from list or Create new project ? Create New Project
Project name [Code Carbon user test]: test ogsl
Project description [Code Carbon user test]: test ogsl
[codecarbon ERROR @ 13:14:18] ApiClient Error when calling the API on https://api.codecarbon.io/projects with : {"name": "test ogsl", "description": "test ogsl", "organization_id": "e52fe339-164d-4c2b-a8c0-f562dfce066d"}
[codecarbon ERROR @ 13:14:18] ApiClient API return http code 404 and answer : {"detail":"Not Found"}
Created project : None
╭────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────╮
│ /home/vscode/.local/lib/python3.12/site-packages/codecarbon/cli/main.py:175 in config                                                                         │
│                                                                                                                                                               │
│   172 │   │   print(f"Created project : {project}")                                                                                                           │
│   173 │   else:                                                                                                                                               │
│   174 │   │   project = [p for p in projects if p["name"] == project][0]                                                                                      │
│ ❱ 175 │   project_id = project["id"]                                                                                                                          │
│   176 │   overwrite_local_config("project_id", project_id, path=file_path)                                                                                    │
│   177 │                                                                                                                                                       │
│   178 │   experiments = api.list_experiments_from_project(project_id)   
@LuisBlanche
Copy link
Contributor

LuisBlanche commented Oct 2, 2024

Hi @robitaillej
We are currently working on creating a new version of the Dashboard + API. The CLI code has been adapted to this new version of the API, hence the old version is not working for the moment and is still up for demonstration purposes only. The release of the new Dashboard will come in a matter of weeks !
You can probably create the project using the REST API directly or through the API doc

@LuisBlanche LuisBlanche added bug Something isn't working API Concern only the codecarbon API Dashboard design dash python labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Concern only the codecarbon API bug Something isn't working Dashboard design dash python
Projects
None yet
Development

No branches or pull requests

2 participants