tkrajina / gpxpy

gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Apache License 2.0
988 stars 223 forks source link

how to use "gpxinfo". #113

Closed PabloCuenca closed 6 years ago

PabloCuenca commented 6 years ago

Hi, i´m a newbie to Python, struggling to make use of gpxpy utility.

First i import it into the main file with import gpxinfo

Then, I invoke gpxinfo.run and I try to pass a gpx file as an argument: gpxinfo.run("D:\Proyecto Balloon\codigo\Quijorna.gpx")

Resulting in the following error: Traceback (most recent call last): Error processing D File "D:\Proyecto Balloon\codigo\gpxinfo.py", line 117, in run gpx = mod_gpxpy.parse(open(gpx_file)) FileNotFoundError: [Errno 2] No such file or directory: 'D'


I have tried other different options resulting also in other errors.

My ultimate goal is to extend "gpxinfo" so that it shows not only full track-segments statistics but also "per km" statistics. Help is much appreciated.

tkrajina commented 6 years ago

gpxinfo is a command line tool, you run it with python gpxinfo, not import it. gpxpy is the library for import.