GithubHelp home page GithubHelp logo

Comments (9)

tkrajina avatar tkrajina commented on May 23, 2024

Hi, Can you send me an example track to test this?

from gpxpy.

szo1215 avatar szo1215 commented on May 23, 2024

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.

tkrajina avatar tkrajina commented on May 23, 2024

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.

szo1215 avatar szo1215 commented on May 23, 2024

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.

jwm-art-net avatar jwm-art-net commented on May 23, 2024

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.

tkrajina avatar tkrajina commented on May 23, 2024

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.

jwm-art-net avatar jwm-art-net commented on May 23, 2024

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.

tkrajina avatar tkrajina commented on May 23, 2024

I changed a couple of lines now. I think it should work now, can you try?

from gpxpy.

jwm-art-net avatar jwm-art-net commented on May 23, 2024

Yes that works for me. Thank you.

from gpxpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.