Skip to content

Broken WFS API Integration (KeyError) #74

@CLiu0412

Description

@CLiu0412

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:.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions