Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

[BUG] Error converting some HiTrack files from Band 4 #44

Closed
processor286 opened this issue Dec 15, 2019 · 0 comments
Closed

[BUG] Error converting some HiTrack files from Band 4 #44

processor286 opened this issue Dec 15, 2019 · 0 comments
Assignees

Comments

@processor286
Copy link

processor286 commented Dec 15, 2019

Input
--log_level DEBUG --file HiTrack_1576242058000157624536800030001

Output
[ERROR] Error generating TCX XML content for activity <HiTrack_1576242058000157624536800030001>
'<' not supported between instances of 'datetime.datetime' and 'NoneType'
Traceback (most recent call last):
File "convert.py", line 1157, in generate_xml
self._generate_walk_run_cycle_xml_data(el_activity)
File "convert.py", line 1211, in _generate_walk_run_cycle_xml_data
for n, segment in enumerate(self.hi_activity.get_segments()):
File "convert.py", line 486, in get_segments
self._calc_segments_and_distances()
File "convert.py", line 570, in _calc_segments_and_distances
self.data_dict = collections.OrderedDict(sorted(self.data_dict.items()))
TypeError: '<' not supported between instances of 'datetime.datetime' and 'NoneType'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "convert.py", line 1559, in
main()
File "convert.py", line 1527, in main
tcx_activity.save()
File "convert.py", line 1318, in save
self.generate_xml()
File "convert.py", line 1204, in generate_xml
raise Exception('Error generating TCX XML content for activity <%s>\n%s', self.hi_activity.activity_id, e)
Exception: ('Error generating TCX XML content for activity <%s>\n%s', 'HiTrack_1576242058000157624536800030001', TypeError("'<' not supported between instances of 'datetime.datetime' and 'NoneType'"))

Files

I don't think I need to attach the file, if I do, please do say.

A few of my files converted. The one that did not has this as the first line:
tp=lbs;k=0;lat=90.0;lon=-80.0;alt=0.0;t=0.0;

The others start with (e.g.)
tp=p-m;k=10000000;v=355.0;
tp=p-m;k=20000000;v=369.0;
tp=p-m;k=30000000;v=547.0;
tp=p-m;k=40000000;v=771.0;

What I did was to delete the first line beginning "tp=" from this track file and it converted okay.

So the question is, what is that line, and should the conversion have handled it being there?

It's not in most of my track files, but is in a couple of them, and they're all done on the band with an outdoor run setting.

Thanks for any insight

(ps. when I upload the converted .tcx to Strava , they don't get maps and segments - is this usual)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants