ratal / mdfreader

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

yop.masterChannelList() TypeError: 'dict' object is not callable #65

Closed jontis closed 7 years ago

jontis commented 7 years ago

mdfConverter can read and conver the file.

yop.masterChannelList() Traceback (most recent call last):

File "", line 1, in yop.masterChannelList()

TypeError: 'dict' object is not callable

ratal commented 7 years ago

Hi Jontis, I guess mdfconverter cannot read your file. I have too little information from trace to help you. Can you post everything please ? Also what version are you using and environment info like python and pyqt version ?

jontis commented 7 years ago

mdfconverter seems to read and convert the file fine (I think, I used it as a test to convert the file). It is mdfreader, used exactly as in the readme example that can't read the file. The file seems to be correctly loaded into mdfreader, and several functions work fine, but not method mdfreader.

jontis commented 7 years ago

I'd be happy to post more information if you point me in the right direction. There is so much of it.

ratal commented 7 years ago

CAn you show an extract of your code using mdfreader ? mdfreader is a moduel by the way, not a method ?

jontis commented 7 years ago

This is my code: from the readme

import mdfreader yop=mdfreader.mdf('NameOfFile') # loads whole mdf file content in yop mdf object yop.keys() # list channels names yop.masterChannelList() # list channels grouped by raster or master channel

Three first lines work great. yop.masterChannelList() does not.

ratal commented 7 years ago

Sorry for this, masterChannelList attribute is a list, so no () at the end: yop.masterChannelList short will work

jontis commented 7 years ago

Ok, that works.

A further comment is that it is not a list, it is a dict. Sorry bout the particulars but that naming causes confusion.