jmackie/activityio

Throws Error by Parsing tcx files from Polar - Garmin / runtastic works well

Opened this issue · 0 comments

importing and calling throws:

dat = aio.read("/home/michael/CloudStation/tcx-files/2017-08-25_12-45-20.tcx")
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/activityio/_util/reader.py", line 55, in smart_reader
return module.read(file_path, **read_kwargs)
File "/usr/local/lib/python3.5/dist-packages/activityio/tcx/_reading.py", line 54, in read_and_format
data = data.astype('float64', copy=False) # try and make numeric
File "/usr/local/lib/python3.5/dist-packages/pandas/util/_decorators.py", line 118, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/generic.py", line 4004, in astype
**kwargs)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 3457, in astype
return self.apply('astype', dtype=dtype, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 3324, in apply
applied = getattr(b, f)(**kwargs)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 544, in astype
**kwargs)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/internals.py", line 625, in _astype
values = astype_nansafe(values.ravel(), dtype, copy=True)
File "/usr/local/lib/python3.5/dist-packages/pandas/core/dtypes/cast.py", line 703, in astype_nansafe
return arr.astype(dtype)
ValueError: could not convert string to float: 'Present'

2015-09-05_09-20-01.tcx.zip