Closed simonpickering closed 9 months ago
I am solving the issue and will provide an update soon. This will be today/tommorow in the new version.
@simonpickering can you please provide also example TCX file so I can test it before new version release.
I don't have anything particularly small/anonymised to hand I'm afraid. I'm happy to test for you though, or I expect you can generate the same behaviour by editing a working TCX to create an empty HeartRateBpm value.
Let me know if I can help, thanks for looking at it so swiftly.
@all-contributors please add @simonpickering for bug reports.
@alenrajsp
I've put up a pull request to add @simonpickering! :tada:
@simonpickering please check the new release 0.4.9 which should solve all your issues. Also please check the updated readme section regarding missing data handling. Closing for now.
If there is missing HR data in a TCX file, the read code is crashing for me with the following error:
...\lib\site-packages\tcxreader\tcxreader.py", line 144, in trackpoint_parser tcx_point.hr_value = int(float(heart_rate.text)) TypeError: float() argument must be a string or a number, not 'NoneType'
Looking inside the TCX there are some missing values: ...
...
I guess this may also apply to other datafields too if the sensor falls out during a ride.
I'm using Python 3.9 (I know, a bit behind the times, but embedded platform) and tcxreader-0.4.6 via pip3.