bennomeier / leCroyParser

A Python Module to parse LeCroy Binary Trace Files
MIT License
12 stars 8 forks source link

Pickling error #5

Closed vongostev closed 3 years ago

vongostev commented 3 years ago

Hi, @bennomeier I use your library to process pulsed oscillograms, so I need to use baseline correction. It is a slow operation, so I tried to save processing results of many files (up to 5000) to reusing it later, but pickle can not dump them because of ScopeData.file is a file handle and can not be pickled. So, I must do

delattr(scopedata, " file")

before saving. Can you fix it in your library? I think, this can be helpful in the future.

bennomeier commented 3 years ago

Hi @vongostev, I have added a statement to delete the filehandle. So now it seems to work. Thanks!