-
Notifications
You must be signed in to change notification settings - Fork 4
Description
KeyError: 'esri:Electricity_Transmission_Substations' due to National Map API Schema Change
Description:
The National Map Web Feature Service (WFS) for substation coordinates seems to have changed its response schema. The code expects keys with the esri: prefix, but the API now returns keys with the National_Electricity_Infrastructure: prefix.
Traceback:
File "src/ispypsa/templater/nodes.py", line 200, in _request_transmission_substation_coordinates
substation = feature["esri:Electricity_Transmission_Substations"]
KeyError: 'esri:Electricity_Transmission_Substations'
Debug Info:
Response keys observed:
National_Electricity_Infrastructure:Electricity_Transmission_Substations
National_Electricity_Infrastructure:NAME
National_Electricity_Infrastructure:SHAPE
Suggested Fix: Update 'src/ispypsa/templater/nodes.py' to use National_Electricity_Infrastructure: prefixes instead of esri:.