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

CSV export without empty row between data? #195

Open
ecalpy opened this issue Mar 23, 2021 · 4 comments
Open

CSV export without empty row between data? #195

ecalpy opened this issue Mar 23, 2021 · 4 comments

Comments

@ecalpy
Copy link

ecalpy commented Mar 23, 2021

To fix this, this line from mdfreader.py needs to change to this:

f = open(filename, "wt", encoding=encoding, newline='')

Originally posted by @cristi-neagu in #135 (comment)

Hello,
Was trying to reopen this issue from 2018, but I was unsuccessful. I tried the suggested modification to mdfreader.py, but my csv exports still contain empty rows between data points.

Can anyone please assist?

Thanks!
Ecalpy

@danielhrisca
Copy link
Contributor

With the latest code (v 4.1) the line is this https://github.com/ratal/mdfreader/blob/master/mdfreader/mdfreader.py#L834

            f = open(file_name, "wt", encoding=encoding, newline="")

This works on my setup

@ecalpy
Copy link
Author

ecalpy commented Mar 24, 2021 via email

@ratal
Copy link
Owner

ratal commented Mar 24, 2021

Thanks Daniel :)
I do not get this issue for Windows and Linux.. wondering why you need this , newline=""
For your time starting at 0, mdfreader is only reading the data that is in your file, but difficult to adjust to what you expect. It seems your logger has some latency with the trigger for recording.
Master channel could be based not only on time but also angle, distance, etc. what makes most sense then ?
If you want to readjust the starting time to 0, you could add a new row at beginning but you will have to check each channel for what makes sense as initial condition.

@ecalpy
Copy link
Author

ecalpy commented Mar 25, 2021 via email

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

3 participants