ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 74 forks source link

Export to csv doubles each line with an empty row #135

Closed livias closed 6 years ago

livias commented 6 years ago

Pyhton version

Please write here the output of printing sys.version

Platform information

Please write here the output of printing platform.platform()

Numpy version

Please write here the output of printing numpy.__version__

mdfreader version

Please write here the output of printing mdfreader.__version__

Description

Please describe the issue here and eventually script used to use mdfreader

Also mentionning version of mdf file will be helpfull (using mdfvalidator or mdfreader if functionnal for reading)

print of issue related variables at the errors location and eventually mdfvalidator screenshots can help troubleshooting complicated issues

cristi-neagu commented 6 years ago

First of, the template is there for a reason. Please use it as much as possible.

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

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

livias commented 6 years ago

Thank you.

ecalpy commented 3 years ago

Hello - I'm having the same issue (my .csv export files have empty rows between data- and I'd like to remove that). I tried adding the "newline='' " into the open function, but it does not change anything. What else could I be doing wrong?

Also just wondering what the background of why there's empty rows on the exports? Readability?

Many thanks!! -ecalpy

PS+ Second question if possible to also answer here: Is there a possibility to have the time array start from 0?

ecalpy commented 3 years ago

First of, the template is there for a reason. Please use it as much as possible.

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

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

Hello- following up that this suggestion did not help!