-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting: "gpxpy.gpx.GPXException: latitude is mandatory in None (got None)" #23
Comments
Yes, I've seen this and it's a problem with a specific .gpx file. I think we should fix this to print the name of the problematic file, skip it and continue. In the meantime, you can temporarily add this to def process_gpx(gpxfile):
+ print(gpxfile)
with open(gpxfile, encoding="utf-8") as f:
activity = gpxpy.parse(f) The either delete the gpx file, or in my case I opened it in a text editor, and found and deleted the problematic <trkpt>
<ele>31.2</ele>
<time>2019-08-31T09:02:36Z</time>
<extensions>
<gpxdata:temp>0</gpxdata:temp>
</extensions>
</trkpt> The rest all have <trkpt lon="24.12345" lat="60.12345">
<ele>31.2</ele>
<time>2019-08-31T09:02:37Z</time>
<extensions>
<gpxdata:temp>29</gpxdata:temp>
</extensions> |
Please see PR #27 to fix this. |
Great, the fix works perfectly! |
Good to hear! I'll merge that and put out a new release so people can do their year-end visualisations! I'm curious, do you know what the problem with your GPX file is? Is it the same thing as I had above? Mine was one that had been combined using the GOTOES utilities. |
Many thanks @hugovk for this and all the recent updates! |
Yes, thanks a lot @hugovk! Strava's Year In Sport was behind a paywall this year so this package helped me get a certain level of satisfaction. Great work! |
Hey,
I tried using the CLI tool but I'm getting this error:
gpxpy.gpx.GPXException: latitude is mandatory in None (got None)
I tried setting
--lon_max, --lat_max
to180,90
and--lat_min, --lon_min
to0,0
but still getting the same error.Is this a problem with a specific .gpx file? And if so how can I find that one because the error doesn't show which file.
Thanks
The text was updated successfully, but these errors were encountered: