CTHRU / Hitrava

Convert your Huawei Health sport activities and import them in Strava.
Other
352 stars 34 forks source link

[SUPPORT] Error during extraction of files. #15

Closed Edgekiller65 closed 4 years ago

Edgekiller65 commented 4 years ago

Hello. While running the extraction file, I'm getting the following message.

Info - External library xmlschema could not be imported. It is required when using the --validate_xml argument. It can be installed using: pip install xmlschema 2020-07-05 18:35:21,708 - INFO - parse - Found one or more activities in JSON at index 0 to parse from 2020-06-21 (YYY-MM-DD) 2020-07-05 18:35:21,708 - INFO - parse - Exporting JSON data of activity at index 0 from 2020-06-21 to file ./output/HiTrack_20200621_170812.json 2020-07-05 18:35:21,708 - INFO - parse - Saving activity at index 0 from 2020-06-21 to HiTrack file ./output/HiTrack_20200621_170812 for parsing 2020-07-05 18:35:21,740 - INFO - parse - Parsing file <./output/HiTrack_20200621_170812> 2020-07-05 18:35:21,740 - ERROR - add_speed_data - One or more required data fields (k, v) missing or invalid in speed data [['k', '5'], ['v', '0.0']] invalid literal for int() with base 10: '0.0' 2020-07-05 18:35:21,740 - ERROR - parse - Error parsing file <./output/HiTrack_20200621_170812> at line <9> CSV data: ['tp=rs', 'k=5', 'v=0.0', ''] ('One or more required data fields (k, v) missing or invalid in speed data %s\n%s', [['k', '5'], ['v', '0.0']]) 2020-07-05 18:35:21,740 - ERROR - parse - Error parsing JSON file <./output/Motion path detail data & description/motion path detail data.json> ('Error parsing file <%s> at line <%d>\n%s', './output/HiTrack_20200621_170812', 9) Traceback (most recent call last): File "C:\Hitrava\Hitrava.py", line 511, in add_speed_data speed_data['rs'] = int(speed_data.pop('v')) ValueError: invalid literal for int() with base 10: '0.0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Hitrava\Hitrava.py", line 949, in parse self.activity.add_speed_data(data_list) File "C:\Hitrava\Hitrava.py", line 519, in add_speed_data raise Exception('One or more required data fields (k, v) missing or invalid in speed data %s\n%s', data) Exception: ('One or more required data fields (k, v) missing or invalid in speed data %s\n%s', [['k', '5'], ['v', '0.0']])

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Hitrava\Hitrava.py", line 1234, in parse hi_activity = hitrack_file.parse() File "C:\Hitrava\Hitrava.py", line 953, in parse raise Exception('Error parsing file <%s> at line <%d>\n%s', self.hitrack_file.name, line_number) Exception: ('Error parsing file <%s> at line <%d>\n%s', './output/HiTrack_20200621_170812', 9)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Hitrava\Hitrava.py", line 1899, in main() File "C:\Hitrava\Hitrava.py", line 1886, in main hi_activity_list = hi_json.parse(args.from_date) File "C:\Hitrava\Hitrava.py", line 1278, in parse raise Exception('Error parsing JSON file <%s>', self.json_file.name) Exception: ('Error parsing JSON file <%s>', './output/Motion path detail data & description/motion path detail data.json')

Therefore, I'm not getting the files converted. Don't know if there's an issue with the downloaded files, or whether it's because they're being taken from a Band 4 Pro.

[LINK REMOVED]