msel-source / pymef

Python wrapper for MEF library
Other
5 stars 3 forks source link

pymef3_file.write_mef_ts_metadata - python crash when section_2 dict has incorrect values #1

Closed SweetVlad closed 6 years ago

SweetVlad commented 6 years ago

Problem Description

  1. write_mef_ts_metadata - if any value in func args 6 and 7 (dictionaries section 2 and 3) has None ---> python crash

  2. write_mef_ts_metadata - dictionary 2 - 'low_frequency_filter_setting': 'no low frequency filter', --> not complete crash but - System Error – returned a results with an error set, metadata are saved but this value will be read and saved as None (by pymef3_file.read_mef_channel_metadata function) 'high_frequency_filter_setting': 9000.0, - correct value is written 'notch_filter_frequency_setting': None, --> python crash

Pymef version and platform

pymef v0.1.7, MacOS High Sierra v 10.13.5

cimbi commented 6 years ago

The solution is to leave out the entry from the dictionary. But I agree it is not intuitive, None should be accepted too. I'll fix this.