Closed jhamilt5 closed 6 years ago
After some testing, it turns out this is linked to issue #12
This behavior seems to happen around 20% of the time, but it kills the execution of the program. I was able to get around it by adding simple loops to retry on failure. I also made that configurable through argparse
to choose the maximum number of retries per activity and how long you should sleep between tries. Through testing, 10 retries and one second of sleep seems to do the trick.
@jhamilt5 can you share diff or make pull reqest?
Thanks, I already have some code under development for #12. I'll try to release it on the master branch as soon as I can.
Den 26 feb. 2018 14:06 skrev "Jakub Tymejczyk" notifications@github.com:
@jhamilt5 https://github.com/jhamilt5 can you share diff or make pull reqest?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/petergardfjall/garminexport/issues/19#issuecomment-368498368, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWoY8NxhPmcI3tGQAEnxo26qoY0jLfgks5tYqxhgaJpZM4RdRHX .
Try out the latest version. It uses a configurable number of retries (--max-retries
) with exponential back-off.
OS:
Ubuntu 16.04.3 LTS
Python Version:2.7.12
Command Line:python garminbackup.py --backup-dir=../activities --format=json_summary <my-email>
Output:Error Output:
<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 500 - org.springframework.beans.factory.BeanCreationException: Autowiring of fields/methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.garmin.connect.service.personalrecord.PersonalRecordService com.garmin.mb.activity.service.ActivityServiceManagerBean.personalRecordService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.garmin.connect.service.personalrecord.PersonalRecordService] is defined: Unsatisfied dependency of type [interface com.garmin.connect.service.personalrecord.PersonalRecordService]: expected at least 1 matching bean</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>org.springframework.beans.factory.BeanCreationException: Autowiring of fields/methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.garmin.connect.service.personalrecord.PersonalRecordService com.garmin.mb.activity.service.ActivityServiceManagerBean.personalRecordService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.garmin.connect.service.personalrecord.PersonalRecordService] is defined: Unsatisfied dependency of type [interface com.garmin.connect.service.personalrecord.PersonalRecordService]: expected at least 1 matching bean</u></p><p><b>description</b> <u>The server encountered an internal error (org.springframework.beans.factory.BeanCreationException: Autowiring of fields/methods failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.garmin.connect.service.personalrecord.PersonalRecordService com.garmin.mb.activity.service.ActivityServiceManagerBean.personalRecordService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.garmin.connect.service.personalrecord.PersonalRecordService] is defined: Unsatisfied dependency of type [interface com.garmin.connect.service.personalrecord.PersonalRecordService]: expected at least 1 matching bean) that prevented it from fulfilling this request.</u></p><HR size="1" noshade="noshade"><h3>JBossWeb/2.0.0.GA</h3></body></html>
Additional Notes: