You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a workaround to solve this issue: open all .tcx files from a given folder and remove (if any) leading blank spaces from the first row:
## Remove leading first line blank spaces of .tcx activity files
def tcx_lstrip():
## List of .tcx files to be imported
activities_files_list = glob.glob(r'activities/*.tcx')
## Remove leading spaces from first row
for index in activities_files_list:
with open(file=index, mode='r') as f:
lines = f.readlines()
lines[0] = lines[0].lstrip()
with open(file=index, mode='w') as f:
f.writelines(lines)
I am having the following problem with .tcx files:
Seems that all my .tcx files have 10 blank spaces before the
<?xml
argument.Is there any possible workaround for reading such .tcx files?
Here's an example: test.txt (file extension was changed to .txt due to GitHub limitations and needs to be changed to .tcx).
Thanks!
The text was updated successfully, but these errors were encountered: