ratal / mdfreader

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

Unexpected ValueError #63

Closed CollegeDev closed 7 years ago

CollegeDev commented 7 years ago

Hey all,

got following error while trying to test the mdfreader:

C:\Users\...............>convert.py
Unexpected error: (<class 'ValueError'>, ValueError('Buffer has wrong number of
dimensions (expected 1, got 2)',), <traceback object at 0x000000001DCC3A48>)
dataRead crashed, back to python data reading
Traceback (most recent call last):
  File "C:\Users\............................\Python\Python36\lib\site-packag
es\mdfreader-0.2.5-py3.6-win-amd64.egg\mdfreader\mdf4reader.py", line 1200, in r
eadBitarray
    self[chan].posByteEnd)
  File "dataRead.pyx", line 68, in dataRead.dataRead (dataRead.c:2157)
  File "dataRead.pyx", line 182, in dataRead.dataReadChar (dataRead.c:3882)
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)

Does anyone of you knows what's going wrong here? The convert.py simply contains following lines:

import mdfreader
content=mdfreader.mdf('man.MF4')

Thanks in advance, CollegeDev

ratal commented 7 years ago

Hi CollegeDev, I do not have enough info troubleshoot. You could send me the file if not confidential. Otherwise, you can add a print(chan) line 1196 and compare with the structure given by MDFValidator from Vector.

ratal commented 7 years ago

Hi, This error line 182 in dataRead should come from a wrong definition of channel. To troubleshoot, you could add a print(self[chan]) line 1199 in mdf4reader and compare it with MDFValidator. Anyway, I think you are able to read your file as the except statement after the dataRead call took over in pure python, so not so critical ?

ratal commented 7 years ago

No feedback for while. Do not hesitate to reopen if this is still an issue.