-
Notifications
You must be signed in to change notification settings - Fork 6
Labels
bugSomething isn't workingSomething isn't workingtriage requiredIssues without priority assessment or milestone.Issues without priority assessment or milestone.
Description
Ra2ce version checks
- I have checked that this issue has not already been reported.
- I have checked that this bug exists on the latest version of Ra2ce in
masterhere.
Reproducible example
network_section = NetworkSection(
network_type=NetworkTypeEnum.DRIVE,
source=SourceEnum.SHAPEFILE,
primary_file=network_path.joinpath("network.shp"),
# file_id="ID",
save_gpkg=True,
reuse_network_output=True,
road_types=[
RoadTypeEnum.SECONDARY,
RoadTypeEnum.SECONDARY_LINK,
RoadTypeEnum.PRIMARY,
RoadTypeEnum.PRIMARY_LINK,
RoadTypeEnum.TRUNK,
RoadTypeEnum.MOTORWAY,
RoadTypeEnum.MOTORWAY_LINK,
],
)Current behaviour
file_ID is by default an empty string '', which breaks things further down the line because the graph (and gdf) now contains an empty attribute with an empty string '' as name.
File "C:\Users\hauth\repositories\ra2ce\ra2ce\analysis\damages\damages.py", line 241, in
if (col[0].isupper() and col[1] == "_")
~~~^^^
IndexError: string index out of range
Desired behaviour
if file_id = '', dont add the attribute to the graph/gdfs
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriage requiredIssues without priority assessment or milestone.Issues without priority assessment or milestone.