Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read PRT files with tab-separated timings #27

Closed
ju-ec opened this issue Jan 18, 2023 · 1 comment
Closed

Cannot read PRT files with tab-separated timings #27

ju-ec opened this issue Jan 18, 2023 · 1 comment

Comments

@ju-ec
Copy link
Contributor

ju-ec commented Jan 18, 2023

bvbabel cannot read any PRTs that save onset and offset event times separated with tabs.
To fix this problem I would suggest to replace the following lines in prt.py:

values = lines[i+2+j].split(" ")

with

values = lines[i+2+j].split()

This will make sure that any whitespace can be used as separator between the timings.Or use values = lines[i+2+j].split(maxsplit=1) to make sure that each line is splitted only once.

Probably less common, but also possible would be the TAB separator for the color definition. Therefore, I would also suggest to replace the following line:

values = lines[i+2+n].split(" ")

with

values = lines[i+2+n].split() 
ofgulban added a commit that referenced this issue Jan 27, 2023
@ofgulban
Copy link
Owner

Thanks @ju-ec for opening this issue and giving your tip. Tabs are considered now.

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

No branches or pull requests

2 participants