Getting location not found when attempting to access emissions/bylocation endpoint #164
Unanswered
soumik061993
asked this question in
Carbon Aware SDK
Replies: 1 comment
|
@russelltrow @Green-Software-Foundation/carbon-aware-sdk-leads |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi All,
I am getting below error when trying to access the local docker instance of carbon-aware-sdk. -
{
"title": "ArgumentException",
"status": 400,
"detail": "Unknown Location: 'westus' not found",
"errors": {},
"traceId": "00-c99e7dcbaeb71924c72f6482fdb478c7-7228aef7b83a11a7-01"
}
Request - http://localhost:8098/emissions/bylocations?location=westus
carbon-aware-sdk:
image: ghcr.io/green-software-foundation/carbon-aware-sdk:latest
ports:
- 8098:80
container_name: carbon-aware-sdk
volumes:
- ./docker/carbon-aware-sdk/location-sources:/app/location-sources
networks:
- localprom
tty:
true
environment:
- DataSources__EmissionsDataSource=WattTime
- DataSources__ForecastDataSource=WattTime
- DataSources__Configurations__WattTime__Type=WattTime
- DataSources__Configurations__WattTime__username=<user_name_registered_via_https://api.watttime.org/login>
- DataSources__Configurations__WattTime__password=<password_registered_via_https://api.watttime.org/login>
- LocationDataSourcesConfiguration__LocationSourceFiles__0__DataFileLocation=azure-regions.json --> this is local file location
- LocationDataSourcesConfiguration__LocationSourceFiles__0__Prefix=az
- LocationDataSourcesConfiguration__LocationSourceFiles__0__Delimiter=-
- LocationDataSourcesConfiguration__LocationSourceFiles__1__DataFileLocation=custom-regions.json --> this is local file location
- LocationDataSourcesConfiguration__LocationSourceFiles__1__Prefix=custom
- LocationDataSourcesConfiguration__LocationSourceFiles__1__Delimiter=_
- DOTNET_URLS=http://+:80
Even tried commenting out the LocationSourceFiles related environment variables and then restarted the container, it was giving me below error -
{
"title": "WattTimeClientHttpException",
"status": 403,
"detail": "Login failed for user: 'soumik.nath'",
"errors": {},
"traceId": "00-809cb8cb7b8e6060c9c26e35a2b2f32d-1ab3ae08c3824b81-01"
}
Could you please help me understand where I am doing wrong?
All reactions