ratal / mdfreader

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

error getting channels with option noDataLoad from mdf version 3 test file #79

Closed danielhrisca closed 6 years ago

danielhrisca commented 6 years ago

I tried to use the newly introduced noDataLoad option

using commit c7d1860

using bench script https://github.com/danielhrisca/asammdf/blob/development/benchmarks/bench.py

I get this error when getting channels from mdf version 3 file:

Traceback (most recent call last):
  File "d:\WinPython-64bit-3.6.2.0Qt5b3\python-3.6.2rc1.amd64\lib\multiprocessing\process.py", line 249, in _bootstrap
    self.run()
  File "d:\WinPython-64bit-3.6.2.0Qt5b3\python-3.6.2rc1.amd64\lib\multiprocessing\process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Work\asammdf\benchmarks\bench.py", line 213, in get_all_reader3_nodata
    y = x.getChannelData(s)
  File "d:\WinPython-64bit-3.6.2.0Qt5b3\python-3.6.2rc1.amd64\lib\site-packages\mdfreader\mdfreader.py", line 441, in getChannelData
    return self._getChannelData3(channelName)
  File "d:\WinPython-64bit-3.6.2.0Qt5b3\python-3.6.2rc1.amd64\lib\site-packages\mdfreader\mdf3reader.py", line 1024, in _getChannelData3
    return self._convert3(channelName)
  File "d:\WinPython-64bit-3.6.2.0Qt5b3\python-3.6.2rc1.amd64\lib\site-packages\mdfreader\mdf3reader.py", line 1042, in _convert3
    vect = self[channelName][dataField][:]
TypeError: 'NoneType' object is not subscriptable
ratal commented 6 years ago

Hi Daniel, Thanks for reporting, indeed an issue there, introduced of new features are not tested enough. Should be fixed with latest commit.

danielhrisca commented 6 years ago

Fixed with the lastest commit