Hi,
I have a strange problem which does not occur all the time, but close to be systematic :
For exactly the same fit file and in the sames conditions (credentials, etc.) the fit file will upload... or not. Here are some logs :
ken:~/.config/garmin-extractor/xxxx/activities$ gupload.py 500.fit
Traceback (most recent call last):
File "/usr/local/bin/gupload.py", line 4, in <module> import('pkg_resources').run_script('GcpUploader==2015.02.28', 'gupload.py')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1438, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/GcpUploader-2015.02.28-py2.7.egg/EGG-INFO/scripts/gupload.py", line 401, in <module>
g.gupload()
File "/usr/local/lib/python2.7/dist-packages/GcpUploader-2015.02.28-py2.7.egg/EGG-INFO/scripts/gupload.py", line 248, in gupload
status, id_msg = g.upload_file(workout.filename)
File "/usr/local/lib/python2.7/dist-packages/GcpUploader-2015.02.28-py2.7.egg/UploadGarmin.py", line 275, in upload_file
res = res.json()["detailedImportResult"]
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 802, in json
return json.loads(self.text, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/simplejson/init.py", line 505, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
File "/usr/local/lib/python2.7/dist-packages/simplejson/scanner.py", line 127, in scan_once
return _scan_once(string, idx)
File "/usr/local/lib/python2.7/dist-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)
As you can see, I use the last release og GpcUploader.
If I understand the error log, the problem seems to come from the response after the connection which could have a bad format.
Any idea ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To be more precise, here is the result from connect.garmin.com :
<html><head><title>JBossWeb/2.0.0.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style></head><body><h1>HTTP Status 403 - Access is denied</h1><HRsize="1"noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b><u>Access is denied</u></p><p><b>description</b><u>Access to the specified resource (Access is denied) has been forbidden.</u></p><HRsize="1"noshade="noshade"><h3>JBossWeb/2.0.0.GA</h3></body></html>
Access is denied, but my authentication is valid ?!?
Last edit: Ken 2015-04-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a strange problem which does not occur all the time, but close to be systematic :
For exactly the same fit file and in the sames conditions (credentials, etc.) the fit file will upload... or not. Here are some logs :
ken:~/.config/garmin-extractor/xxxx/activities$ gupload.py 500.fit
Traceback (most recent call last):
File "/usr/local/bin/gupload.py", line 4, in <module>
import('pkg_resources').run_script('GcpUploader==2015.02.28', 'gupload.py')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1438, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/GcpUploader-2015.02.28-py2.7.egg/EGG-INFO/scripts/gupload.py", line 401, in <module>
g.gupload()
File "/usr/local/lib/python2.7/dist-packages/GcpUploader-2015.02.28-py2.7.egg/EGG-INFO/scripts/gupload.py", line 248, in gupload
status, id_msg = g.upload_file(workout.filename)
File "/usr/local/lib/python2.7/dist-packages/GcpUploader-2015.02.28-py2.7.egg/UploadGarmin.py", line 275, in upload_file
res = res.json()["detailedImportResult"]
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 802, in json
return json.loads(self.text, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/simplejson/init.py", line 505, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
File "/usr/local/lib/python2.7/dist-packages/simplejson/scanner.py", line 127, in scan_once
return _scan_once(string, idx)
File "/usr/local/lib/python2.7/dist-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)
And some seconds after :
ken:~/.config/garmin-extractor/xxxx/activities$ gupload.py -v 1 500.fit
2015-04-10 12:52:23,683::main::DEBUG::Using credentials from '/home/ken/.guploadrc'.
2015-04-10 12:52:23,683::main::DEBUG::Username: xxx
2015-04-10 12:52:23,683::main::DEBUG::Password: **
2015-04-10 12:52:23,683::main::DEBUG::Filename: 2015-04-04_10-05-57_4_500.fit
2015-04-10 12:52:23,683::main::DEBUG::File exists.
2015-04-10 12:52:23,683::main::DEBUG::File Extension: .fit
2015-04-10 12:52:23,683::main::DEBUG::File '2015-04-04_10-05-57_4_500.fit' extension '.fit' is valid.
2015-04-10 12:52:24,103::UploadGarmin::INFO::Rate limited for 0.000000
2015-04-10 12:52:26,762::UploadGarmin::INFO::Rate limited for 0.000000
2015-04-10 12:52:27,762::UploadGarmin::INFO::Rate limited for 0.414629
2015-04-10 12:52:28,332::main::INFO::Login Successful.
2015-04-10 12:52:28,763::UploadGarmin::INFO::Rate limited for 0.429751
File: 2015-04-04_10-05-57_4_500.fit ID: 742224321 Status: SUCCESS Name: N/A Type: N/A
As you can see, I use the last release og GpcUploader.
If I understand the error log, the problem seems to come from the response after the connection which could have a bad format.
Any idea ?
To be more precise, here is the result from connect.garmin.com :
Access is denied, but my authentication is valid ?!?
Last edit: Ken 2015-04-10