Skip to content

fill_lanes exception handling incomplete #3

@keesvanginkel

Description

@keesvanginkel

When calling load_network() for all roads, i.e. with keyword mainroad=False, the function fill_lanes is raising an error.

There is already some exception handling in fill_lanes, but apparently this is not complete yet.

Traceback (most recent call last):
File "D:/Python/trails/Waterbom_analyse.py", line 68, in
network = load_network(str(zh_pbf),mainroad=False)
File "src\trails\flow_model.py", line 71, in load_network
net = fill_attributes(net)
File "src\trails\simplify.py", line 1412, in fill_attributes
network.edges['lanes'] = network.edges.apply(lambda x: fill_lanes(x),axis=1)

File "C:\Users\Ginkel\AppData\Local\Continuum\anaconda3\envs\trails\lib\site-packages\pandas\core\indexes\base.py", line 3082, in get_loc
raise KeyError(key) from err
KeyError: 'cycleway'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions