tcgoetz / GarminDB

Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.18k stars 142 forks source link

Error after new skiing activity #43

Closed christian-ho closed 4 years ago

christian-ho commented 4 years ago

After I have completed two "Skiing" activities, I get the following error message: (At least I think it has something to do with those activities)

I'm on the newest 1.2.1 release.

Processing FileType.activity FIT data from /home/christian/HealthData/FitFiles/Activities
Traceback (most recent call last):
  File "garmin.py", line 388, in <module>
    main(sys.argv[1:])
  File "garmin.py", line 381, in main
    analyze_data(debug)
  File "garmin.py", line 224, in analyze_data
    analyze.get_stats()
  File "/home/christian/Projekte/GarminDB/analyze_garmin.py", line 173, in get_stats
    self.__get_activities_stats()
  File "/home/christian/Projekte/GarminDB/analyze_garmin.py", line 94, in __get_activities_stats
    stat_logger.info("Sports: %s", ', '.join(sports))
TypeError: sequence item 6: expected str instance, NoneType found
Command exited with non-zero status 1
/usr/bin/time
Makefile:121: recipe for target 'update_garmin' failed
make: *** [update_garmin] Error 1
tcgoetz commented 4 years ago

Try 1.2.2: https://github.com/tcgoetz/GarminDB/releases/tag/v1.2.2

christian-ho commented 4 years ago

Same error with version 1.2.2.

tcgoetz commented 4 years ago

Maybe there is still an error, but it can't be the same error. The code is different. Can you post the error?

christian-ho commented 4 years ago

Only the line numbers changed:

Processing FileType.activity FIT data from /home/christian/HealthData/FitFiles/Activities
Traceback (most recent call last):
  File "garmin.py", line 389, in <module>
    main(sys.argv[1:])
  File "garmin.py", line 382, in main
    analyze_data(debug)
  File "garmin.py", line 225, in analyze_data
    analyze.get_stats()
  File "/home/christian/Projekte/GarminDB/analyze_garmin.py", line 173, in get_stats
    self.__get_activities_stats()
  File "/home/christian/Projekte/GarminDB/analyze_garmin.py", line 94, in __get_activities_stats
    stat_logger.info("Sports: %s", ', '.join(sports) if sports is not None else '')
TypeError: sequence item 6: expected str instance, NoneType found
Command exited with non-zero status 1
/usr/bin/time
Makefile:121: recipe for target 'update_garmin' failed
make: *** [update_garmin] Error 1
tcgoetz commented 4 years ago

try v1.2.3: https://github.com/tcgoetz/GarminDB/releases/tag/v1.2.3

christian-ho commented 4 years ago

Thanks for your efforts Tom, now I get another error message (after generating tables):

Traceback (most recent call last):
  File "garmin.py", line 389, in <module>
    main(sys.argv[1:])
  File "garmin.py", line 382, in main
    analyze_data(debug)
  File "garmin.py", line 227, in analyze_data
    analyze.create_dynamic_views()
  File "/home/christian/Projekte/GarminDB/analyze_garmin.py", line 304, in create_dynamic_views
    course_ids = gc_config.course_views('steps')
  File "/home/christian/Projekte/GarminDB/garmin_connect_config_manager.py", line 71, in course_views
    return self.config['course_views'][type]
KeyError: 'course_views'
Command exited with non-zero status 1
/usr/bin/time
Makefile:121: recipe for target 'update_garmin' failed
make: *** [update_garmin] Error 1
tcgoetz commented 4 years ago

try: https://github.com/tcgoetz/GarminDB/releases/tag/v1.2.4

christian-ho commented 4 years ago

Now it runs without errors, thanks.