Comments (9)
Hi, Can you send me an example track to test this?
from gpxpy.
It is strava gpx file.
Thanks.
2015-10-27 2:52 GMT+09:00 Tomo Krajina [email protected]:
Can you send me an example track to test this?
—
Reply to this email directly or view it on GitHub
#48 (comment).
from gpxpy.
I tried to parse and convert back to XML, and to me it looks like it works:
In [1]: import gpxpy
In [4]: gpx = gpxpy.parse(file('test_files/gpx1.1_with_all_fields.gpx'))
In [5]: gpx.author_name
Out[5]: 'author name'
In [6]: gpx = gpxpy.parse(file('test_files/gpx1.0_with_all_fields.gpx'))
In [7]: gpx.author_name
Out[7]: 'example author'
It is strava gpx file.
I know it's a Strava file, you already said that. I asked if you can send me that file. I don't plan to experiment with Strava and figure out what "It didn't work" means. If you already have a file -- why wouldn't you help me by sending it? Also, a couple of lines with your gpxpy code is welcome.
I know this may sound rude, but keep in mind that I am willing to help/fix your bug. "It's a strava file" and "It didn't work" just isn't a valid bug request.
from gpxpy.
I don't have experience about sending open source issue. so I did that.
If I were send other bug request, I would get more cautious.
I'm sorry.
from gpxpy.
Have same issue with GPX files which have been converted from TCX files by gpsbabel. The TCX files were converted from Garmin FIT files by fittotcx.
http://pastebin.com/NhXC6xVX (expires one month from 20151105)
from gpxpy.
Note that the gpx1.1 implementation has no simple <author>
property. That's why the new gpxpy (1.0+) has a slightly different object model. The properties in the gpxpy are made to work with both gpx1.0 and gpx1.1. That's why the author fields are:
self.author_name = None
self.author_email = None
self.author_link = None
self.author_link_text = None
self.author_link_type = None
If you try to add <author>qwe</author>
in your file and check gpx.author_name
(not gpx.author
) it should be qwe
.
from gpxpy.
I'm not using the Library API but the gpxinfo command line tool. I don't really follow what you're saying. I added <author>qwe</author>
to the file and re-ran gpxinfo and still get the above error message. Then I converted a TCX into a GPX 1.1 thinking that would help but still the same 'no author' error.
It seems to me that the author attribute is optional and the case where it is missing should be handled gracefully. Is that not correct?
from gpxpy.
I changed a couple of lines now. I think it should work now, can you try?
from gpxpy.
Yes that works for me. Thank you.
from gpxpy.
Related Issues (20)
- NameError: free variable 'from_start_to_end' referenced before assignment in enclosing scope HOT 1
- Setup.py method is being deprecated in python package
- Confusion!
- Wrong distance? 10.4 km instead of 7.6 km HOT 1
- Save nsmap of GPX in GPXTrack, GPXTrackSegment and GPXTrackPoint
- GPX track all messed up HOT 1
- Tag a release to ship improvements since 1.5.0 HOT 1
- TypeError in gpxfield since 1.6.0 release HOT 1
- Changes Backported To 1.5.0 HOT 2
- Typo in __repr__ of SimpleTZ HOT 1
- [newbie] Wrong return type on GPXTrackSegment.get_duration() HOT 1
- create CI testing scripts HOT 1
- feature request: include distance_from_start in NearestLocationsData class HOT 1
- Is Header malformed
- Check for GPX root node on parse HOT 1
- Custom attributes in `to_xml` not escaped properly HOT 1
- Wrong type annotation for radians in method elevation angle?
- to_xml removes metadata extensions without the name tag present HOT 1
- Implement support for adding extension section to a waypoint/track/...
- Links in XML not properly encoded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpxpy.