Comments (8)
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.
;)
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.
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.
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.
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.
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.
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.
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)
- TypeError: cannot concatenate 'str' and 'int' objects HOT 4
- post-auth url
- Error 410 and solution HOT 4
- Downloading TCX Files HOT 1
- Can't import .fit files HOT 1
- unexpected HTTP error (410) HOT 1
- Garmin change something.!! HOT 1
- Script crashes on non-gpx workouts when not using -f argument HOT 1
- Crashes with 404 error HOT 2
- UnicodeEncodeError for ø HOT 1
- Unable to download GPX or TCX HOT 2
- 503 Service Unavailable HOT 6
- Update URL paths HOT 1
- HTTP Error 404 HOT 2
- This repro is not maintained ?!? HOT 1
- Errors starting the py-script HOT 3
- "HTTP error 402: payment required" HOT 2
- Payment required HOT 2
- Ticket Cookie HOT 1
- Garmin new UI statistics
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 garmin-connect-export.