Git Product home page Git Product logo

Comments (8)

lefty01 avatar lefty01 commented on August 23, 2024

does it work outside of cron? run from cmdline to check ...
if that works grep your LANG env variable and use that in the cronjob... you'll need unicode (UTF-8)
setting LANG inside the cronscript should work eg. something like: export LANG=en_US.UTF-8
cron does not import your "usual" environment, but you know that ;)

from garmin-connect-export.

JoGu01 avatar JoGu01 commented on August 23, 2024

;)
Yeah i know that and it was the first thing i tried.
-> second line of the script: export LANG=de_DE.UTF-8 ...
And the really frustrating thing is that it is indeed working from commandline.
I am absolutely out of ideas. Any others hints?

Thanks for this great script.
Regards,
Jörg

from garmin-connect-export.

ebrensi avatar ebrensi commented on August 23, 2024

Perhaps try my fork of it:
https://github.com/ebrensi/garmin-connect-export.git

Mine is both Python 2 and 3 ready and it uses unicode string literals, so it might fix your problem.
I submitted a pull request for it. check it out:
#14

from garmin-connect-export.

JoGu01 avatar JoGu01 commented on August 23, 2024

Thanks for your answer.
Tried your fork and it gives a lot of debugging-infos.
Unfortunately it shows the same error:

INFO:Welcome to Garmin Connect Exporter!
INFO:Warning: Output directory already exists. Will skip already-downloaded files and append to the CSV file.
INFO:Starting new HTTPS connection (1): sso.garmin.com
DEBUG:"GET /sso/login?service=https://connect.garmin.com/post-auth/login&webhost=olaxpw-connect04&source=https://connect.garmin.com/en-US/signin&redirectAfterAccountLoginUrl=https://connect.garmin.com/post-auth/login&redirectAfterAccountCreationUrl=https://connect.garmin.com/post-auth/login&gauthHost=https://sso.garmin.com/sso&locale=en_US&id=gauth-widget&cssUrl=https://static.garmincdn.com/com.garmin.connect/ui/css/gauth-custom-v1.1-min.css&clientId=GarminConnect&rememberMeShown=true&rememberMeChecked=false&createAccountShown=true&openCreateAccount=false&usernameShown=false&displayNameShown=false&consumeServiceTicket=false&initialFocus=true&embedWidget=false&generateExtraServiceTicket=false HTTP/1.1" 200 8014
DEBUG:"POST /sso/login?service=https://connect.garmin.com/post-auth/login&webhost=olaxpw-connect04&source=https://connect.garmin.com/en-US/signin&redirectAfterAccountLoginUrl=https://connect.garmin.com/post-auth/login&redirectAfterAccountCreationUrl=https://connect.garmin.com/post-auth/login&gauthHost=https://sso.garmin.com/sso&locale=en_US&id=gauth-widget&cssUrl=https://static.garmincdn.com/com.garmin.connect/ui/css/gauth-custom-v1.1-min.css&clientId=GarminConnect&rememberMeShown=true&rememberMeChecked=false&createAccountShown=true&openCreateAccount=false&usernameShown=false&displayNameShown=false&consumeServiceTicket=false&initialFocus=true&embedWidget=false&generateExtraServiceTicket=false HTTP/1.1" 200 1987
INFO:Starting new HTTPS connection (1): connect.garmin.com
...
DEBUG:"GET /modern/ HTTP/1.1" 200 3828
INFO:Starting new HTTP connection (1): connect.garmin.com
DEBUG:"GET /proxy/activity-search-service-1.0/json/activities?start=0&limit=14 HTTP/1.1" 302 0
DEBUG:"GET /proxy/activity-search-service-1.0/json/activities?start=0&limit=14 HTTP/1.1" 200 16562
INFO:Garmin Connect activity: [1140387973] Düsseldorf-Marathon Staffel Abschnitt 2
So, 2016 Apr 24 11:06, 01:19:47, 13,31 Kilometer
INFO:Downloading activity...
DEBUG:"GET /proxy/download-service/files/activity/1140387973 HTTP/1.1" 302 0
DEBUG:"GET /proxy/download-service/files/activity/1140387973 HTTP/1.1" 200 None
Traceback (most recent call last):
File "./gcexport.py", line 467, in
csv_file.write(csv_record)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 15: ordinal not in range(128)

from garmin-connect-export.

ebrensi avatar ebrensi commented on August 23, 2024

ok try it now. https://github.com/ebrensi/garmin-connect-export.git
I tested it out in Python 2 and 3 with all file output types (tcx, gpx, "original"), with a Garmin connect activity with some European characters in the description.

from garmin-connect-export.

JoGu01 avatar JoGu01 commented on August 23, 2024

Hi Efrem,

the error is gone an the script is now downloading 👍
But now there is an other issue.
The script outputs "INFO:Warning: Output directory already exists. Will skip already-downloaded files and append to the CSV file." which is absolutely true.
The Problem is, that the existing files are NOT skipped.
I can absolutely live with that, but i think ist was not intended to work this way 😉

Thanks and Regards,
Jörg

from garmin-connect-export.

ebrensi avatar ebrensi commented on August 23, 2024

Jörg, gcexport.py skips files correctly now. Note that if you have the -c tag set (i.e.gcexport -c 2 ...), the files that are skipped count towards the total number of files to be retrieved, so if set it download 2 files, and you already have the latest 2 files, nothing will get downloaded.

from garmin-connect-export.

JoGu01 avatar JoGu01 commented on August 23, 2024

Hi Efrem,
Just tested it. No more error and skipping already downloaded files.
Thanks for your help 👍
Regards,
Jörg

from garmin-connect-export.

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.