Skip to content

Hardcoded Placeholder OpenCage API Key Causes Errors #4

@agmangas

Description

@agmangas

I've observed that the Forecasting API produces silent errors due to a hardcoded placeholder OpenCage API key. For example:

[...]
SANKEY CHECK  inputs=14782064.6  outputs+storage=8089669.8  residual=6692394.8 Wh (45.274%)
  0%|          | 0/13 [00:00<?, ?it/s, Info=Inizailization 1][15:22:38] DEBUG    Starting new HTTPS connection (1):    connectionpool.py:1049
                    re.jrc.ec.europa.eu:443                                     
[15:22:59] DEBUG    https://re.jrc.ec.europa.eu:443 "GET   connectionpool.py:544
                    /api/tmy?lat=37.98880066730187&lon=23.                      
                    733531819066098&outputformat=json&brow                      
                    ser=1 HTTP/1.1" 200 1445752                                 
  8%|▊         | 1/13 [00:22<04:35, 22.99s/it, Info=Inizailization 1][15:23:01] DEBUG    Starting new HTTPS connection (1):    connectionpool.py:1049
                    re.jrc.ec.europa.eu:443                                     
[15:23:27] DEBUG    https://re.jrc.ec.europa.eu:443 "GET   connectionpool.py:544
                    /api/tmy?lat=37.98880066730187&lon=23.                      
                    733531819066098&outputformat=json&brow                      
                    ser=1 HTTP/1.1" 200 1445752                                 
100%|██████████| 13/13 [00:54<00:00,  4.20s/it, Info=Calculating solar absorption of element]    
[15:23:32] DEBUG    Starting new HTTPS connection (1):    connectionpool.py:1049
                    api.opencagedata.com:443                                    
[15:23:33] DEBUG    https://api.opencagedata.com:443 "GET  connectionpool.py:544
                    /geocode/v1/json?q=37.98880066730187%2                      
                    C23.733531819066098&key=YOUR_OPENCAGE_                      
                    API_KEY&no_annotations=1&language=en                        
                    HTTP/1.1" 401 296
[...]                                     

It looks like we need some way to configure the OpenCage API key so that requests to api.opencagedata.com don't fail with a 401, correct?

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions