Green-Software-Foundation / carbon-aware-sdk

Carbon-Aware SDK
https://carbon-aware-sdk.greensoftware.foundation/
MIT License
473 stars 99 forks source link

[Bug]: Unhandled exception. CarbonAware.Exceptions.ConfigurationException: No data sources are configured #426

Open jacksorjacksor opened 11 months ago

jacksorjacksor commented 11 months ago

Contact Details

jacksorjacksor@pm.me

What happened?

First attempt at running .\caw.exe -h (as per docs) and received error message.

Prior actions:

Full error log:

 CarbonAwareSdk  .\caw.exe -h
Unhandled exception. CarbonAware.Exceptions.ConfigurationException: No data sources are configured
   at CarbonAware.DataSources.Configuration.ServiceCollectionExtensions.AddDataSourceService(IServiceCollection services, IConfiguration configuration) in D:\OneDriveFolders\OneDrive\Documents\Coding\carbon-aware-sdk\src\CarbonAware.DataSources\CarbonAware.DataSources.Registration\Configuration\ServiceCollectionExtensions.cs:line 80
   at GSF.CarbonAware.Configuration.ServiceCollectionExtensions.AddEmissionsServices(IServiceCollection services, IConfiguration configuration) in D:\OneDriveFolders\OneDrive\Documents\Coding\carbon-aware-sdk\src\GSF.CarbonAware\src\Configuration\ServiceCollectionExtensions.cs:line 24
   at Program.<Main>$(String[] args) in D:\OneDriveFolders\OneDrive\Documents\Coding\carbon-aware-sdk\src\CarbonAware.CLI\src\Program.cs:line 31
   at Program.<Main>(String[] args)

client

CLI

Relevant log output

 CarbonAwareSdk  .\caw.exe -h
Unhandled exception. CarbonAware.Exceptions.ConfigurationException: No data sources are configured
   at CarbonAware.DataSources.Configuration.ServiceCollectionExtensions.AddDataSourceService(IServiceCollection services, IConfiguration configuration) in D:\OneDriveFolders\OneDrive\Documents\Coding\carbon-aware-sdk\src\CarbonAware.DataSources\CarbonAware.DataSources.Registration\Configuration\ServiceCollectionExtensions.cs:line 80
   at GSF.CarbonAware.Configuration.ServiceCollectionExtensions.AddEmissionsServices(IServiceCollection services, IConfiguration configuration) in D:\OneDriveFolders\OneDrive\Documents\Coding\carbon-aware-sdk\src\GSF.CarbonAware\src\Configuration\ServiceCollectionExtensions.cs:line 24
   at Program.<Main>$(String[] args) in D:\OneDriveFolders\OneDrive\Documents\Coding\carbon-aware-sdk\src\CarbonAware.CLI\src\Program.cs:line 31
   at Program.<Main>(String[] args)

Code of Conduct

danuw commented 9 months ago

@YaSuenag can you help double check this (in relation to your PR ? #450 ) please?

YaSuenag commented 9 months ago

@YaSuenag can you help double check this (in relation to your PR ? #450 ) please?

I think it is nature after because the user should configure data source / locations. So I've proposed #450 to enforce these configurations to the SDK users. If #450 is accepted, this issue can be closed as not a bug.

github-actions[bot] commented 5 months ago

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

YaSuenag commented 5 months ago

Please keep this issue while #450 is opened. See comments from me in above.

github-actions[bot] commented 1 month ago

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

YaSuenag commented 1 month ago

Wait! As I said before, I will start to work for this issue after #450 .