Skip to content

gpx.waypoints.append() bug when trying to produce gpx file. using a for loop #287

@nirabsarma

Description

@nirabsarma

I've encountered what I think is a bug when trying to append coordinates sourced from a csv file to a gpx file using the gpx.waypoints.append() function. I've attached a demonstration .py file, csv file and the offending gpx file as well.

I expected to get a gpx file with all individual points.

I got a gpx file with multiple waypoint entries, but every waypoint has the same coordinate and label.

e.g. expected output in XML file:

waypoint1, x1,y1
waypoint2, x2,y2
waypoint4, x3,y3
waypoint4, x4,y4

actual output in XML file:

waypoint4, x4,y4
waypoint4, x4,y4
waypoint4, x4,y4
waypoint4, x4,y4

Note, it's using the last used waypoint and overwrites the rest of the waypoints that should be in there.

Here's a zip file with a code demo:

bug_demo_Gpx_append.zip

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