Hi,
From today the file uploads give an error for me. The workout appears in Garmin Connect but its name is Untitled.
I use Python 2.7.10 and 2.7.11 on Arch Linux.
I get the following messages:
Traceback (most recent call last):
File "/usr/bin/gupload.py", line 401, in <module>
g.gupload()
File "/usr/bin/gupload.py", line 248, in gupload
status, id_msg = g.upload_file(workout.filename)
File "/usr/lib/python2.7/site-packages/UploadGarmin.py", line 275, in upload_file
res = res.json()["detailedImportResult"]
File "/usr/lib/python2.7/site-packages/requests/models.py", line 805, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python2.7/site-packages/simplejson/__init__.py", line 516, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Failed to upload: 1
I recently made an OS upgrade which might be related to the issue. The following packages were upgraded:
python-urllib3 (1.12-3 -> 1.13-1)
python-xcffib (0.4.0-1 -> 0.4.0-2)
python2 (2.7.10-2 -> 2.7.11-1)
python2-setuptools (1:18.5-1 -> 1:18.8.1-1)
I downgraded back to the former versions but no luck, same error message.
Can anyone help, pls?
Last edit: Gyorgy Rath 2015-12-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, my time to support this program is extremely limited at this time. One thing you might try is open the file UploadGarmin.py and comment out the following block of code....
I have my doubts that this will help, but it is worth trying. It sounds like Garmin may have changed the way their web API works, which could take a considerable amount of time to debug.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The activity is uploaded to Garmin but its name is always "Untitled", even if I use the -a argument to set the activity title. I believe, there is a code that downloads a json file from Garmin to determine the activity types accepted by Garmin and this json fails to be parsed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This looks like Garmin have done changes in the server backend, some server postprocessing requires more input to convert an activity to a GeoActivity, whatever that is. The line that throws the exception is
res = res.json()["detailedImportResult"]
Because the result (pasted by Frank above) does not json encode properly. For now, I've commented that and the uses of res later and uploading still works. Setting names doesn't seem to work at all, I get a 500 (server error) and no effect on the workout.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
iam trying to import more than 400 exported runtastic gpx file to garmin and getting the same error as Gyorgy Rath again.
Could one perhaps lead me to the code that needs to commented so iam able to upload those files and do not have to use the garmin manual uploader for all 400 files?
2016-02-26 13:01:02,687::__main__::DEBUG::Filename: D:\Downloads\runtastic\Laufe
n\runtastic_20100802_1812_Laufen.gpx
2016-02-26 13:01:02,687::__main__::DEBUG::File exists.
2016-02-26 13:01:02,687::__main__::DEBUG::File Extension: .gpx
2016-02-26 13:01:02,688::__main__::DEBUG::File 'D:\Downloads\runtastic\Laufen\ru
ntastic_20100802_1812_Laufen.gpx' extension '.gpx' is valid.
2016-02-26 13:01:03,723::UploadGarmin::INFO::Rate limited for 0.000000
2016-02-26 13:01:05,063::UploadGarmin::INFO::Rate limited for 0.000000
2016-02-26 13:01:06,062::UploadGarmin::INFO::Rate limited for 0.514000
2016-02-26 13:01:06,654::__main__::INFO::Login Successful.
2016-02-26 13:01:07,062::UploadGarmin::INFO::Rate limited for 0.408000
Traceback (most recent call last):
File "C:\Python27\Scripts\gupload.py", line 401, in <module>
g.gupload()
File "C:\Python27\Scripts\gupload.py", line 248, in gupload
status, id_msg = g.upload_file(workout.filename)
File "C:\Python27\lib\site-packages\UploadGarmin.py", line 275, in upload_file
res = res.json()["detailedImportResult"]
File "C:\Python27\lib\site-packages\requests\models.py", line 808, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Python27\lib\site-packages\simplejson\__init__.py", line 516, in load
s
return _default_decoder.decode(s)
File "C:\Python27\lib\site-packages\simplejson\decoder.py", line 370, in decod
e
obj, end = self.raw_decode(s)
File "C:\Python27\lib\site-packages\simplejson\decoder.py", line 400, in raw_d
ecode
return self.scan_once(s, idx=_w(s, idx).end())
File "C:\Python27\lib\site-packages\simplejson\scanner.py", line 127, in scan_
once
return _scan_once(string, idx)
File "C:\Python27\lib\site-packages\simplejson\scanner.py", line 118, in _scan
_once
raise JSONDecodeError(errmsg, string, idx)
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Regards
Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It works for me, no need to comment anything in the code. Although I use Linux and as I can see you have windows. It is possible that the json library in windows is broken but I am just guessing, I am far from being an expert.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
They seem to have changed something at Garmin Connect. Uploading works again without any warning message, workout titles are also set correctly. Problem solved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
From today the file uploads give an error for me. The workout appears in Garmin Connect but its name is Untitled.
I use Python 2.7.10 and 2.7.11 on Arch Linux.
I get the following messages:
I recently made an OS upgrade which might be related to the issue. The following packages were upgraded:
python-urllib3 (1.12-3 -> 1.13-1)
python-xcffib (0.4.0-1 -> 0.4.0-2)
python2 (2.7.10-2 -> 2.7.11-1)
python2-setuptools (1:18.5-1 -> 1:18.8.1-1)
I downgraded back to the former versions but no luck, same error message.
Can anyone help, pls?
Last edit: Gyorgy Rath 2015-12-15
No one experiencing this?
Hi Gyorgy,
Sorry, my time to support this program is extremely limited at this time. One thing you might try is open the file UploadGarmin.py and comment out the following block of code....
....and replace it with this...
I have my doubts that this will help, but it is worth trying. It sounds like Garmin may have changed the way their web API works, which could take a considerable amount of time to debug.
I'm also experiencing this issue, although the files are still uploaded to the Garmin site, so I suspect it is in the final part of the upload.
Also, the information from the last frame may help:
I'm not sure what Garmin's API is, but the complaint is that some URL you want does not exist.
import json as simplejson did not help.
The activity is uploaded to Garmin but its name is always "Untitled", even if I use the -a argument to set the activity title. I believe, there is a code that downloads a json file from Garmin to determine the activity types accepted by Garmin and this json fails to be parsed.
This looks like Garmin have done changes in the server backend, some server postprocessing requires more input to convert an activity to a GeoActivity, whatever that is. The line that throws the exception is
Because the result (pasted by Frank above) does not json encode properly. For now, I've commented that and the uses of res later and uploading still works. Setting names doesn't seem to work at all, I get a 500 (server error) and no effect on the workout.
Hi,
iam trying to import more than 400 exported runtastic gpx file to garmin and getting the same error as Gyorgy Rath again.
Could one perhaps lead me to the code that needs to commented so iam able to upload those files and do not have to use the garmin manual uploader for all 400 files?
Regards
Jens
It works for me, no need to comment anything in the code. Although I use Linux and as I can see you have windows. It is possible that the json library in windows is broken but I am just guessing, I am far from being an expert.
They seem to have changed something at Garmin Connect. Uploading works again without any warning message, workout titles are also set correctly. Problem solved.