-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading Error Using "ChannelList" #153
Comments
Hi, |
Hi ratal, thanks for your reply. I deinstalled cython and then reinstalled it using pip:
So, I assume that cython is installed properly on my system. However, I still get the same warning messages as printed above. Do you have an idea what else I can try to get the fast cython read in running? Best wishes |
Hi Philip, |
Hi ratal, installing mdfreader works fine, without errors. I used pip:
Now, I have also installed a working compiler, namely Visual Studio Build Tools: https://blogs.msdn.microsoft.com/vcblog/2017/11/02/visual-studio-build-tools-now-include-the-vs2017-and-vs2015-msvc-toolsets For testing, I ran the "hello world" example from cython (https://cython.readthedocs.io/en/latest/src/quickstart/build.html). After installing Visual Studio Build Tools, cython works fine now. I updated cython to version 0.29. However, I still get the following messages when running mdfreader together with channellist:
So, there seems to be another problem. Do you have any idea what else I can try? It says that the module 'dataRead' is not found. Do I need to add some directory to my source path? Best wishes |
Thanks, now it's working! |
Hi again! I think I found a bug when using "channelList". In my MDF-3-file I have a binary signal, which is 0 at the beginning and jumps to 1 after 1083 seconds. When I read in all channels, the data is correctly imported. When I read in only one channel, the signal is loaded in as a flat 0 for all times, which is not the true signal.
This code results in the following plot: |
Hi, |
Hi ratal, |
Hi, |
Hi,
|
The bug I fixed should not have improved the situation. |
Ok, I uninstalled mdfreader by execution of
The error message you refered to is not printed anymore. However, the binary signal which I would like to analyze is still incorrectly displayed. There is no warning message which says that I am falling back to the python version of dataRead (there is no warning message at all). |
I noticed that the same bug also occurs when using
|
Good for the setup. |
Please tell me in which file and which line I should set a breakpoint to check the input arguments. |
@proedig |
in mdf3reader.py, record class, readSortedRecord, line 533 |
Hi Daniel, unfortunately I am not allowed to share this data file with others outside my company. Please let me know if I can provide other useful information about this problem. |
Ok, when executing
I come along line 533 for two times. Since I have only one label I assume the first time is for the time vector and the second time for the signal values? These are the input argument of dataRead for the first time: chan.bitCount = 64 For the second time: chan.bitCount = 1 |
Yes, indeed if master channel data of the channel is not yet loaded, mdfreader load it. |
ok, there is no recordid, not the issue. |
Most probably found, please confirm. |
Thank you very much for your efforts. Now it's working and the signal data is read in correctly. As you said, the bug was in line 542 in mdf3reader.py. However, in my version I had to change it to |
Python version
'3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]'
Platform information
'Windows-10-10.0.14393-SP0'
Numpy version
'1.14.3'
mdfreader version
mdfreader 2.7.8
Description
Hi! I have problem with reading in mdffiles using the optional argument "channellist".
When I try
data = mdfreader.mdf(file)
there is no problem. All channels are read in. When I try the same file with
data = mdfreader.mdf(file,channelList=['n'])
I get the following output:
C:\ProgramData\Anaconda3\lib\site-packages\mdfreader\mdf3reader.py:552: UserWarning: Unexpected error: (<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'dataRead'",), <traceback object at 0x00000258E3768EC8>)
warn('Unexpected error: {}'.format(exc_info()))
C:\ProgramData\Anaconda3\lib\site-packages\mdfreader\mdf3reader.py:553: UserWarning: dataRead crashed, back to python data reading
warn('dataRead crashed, back to python data reading')
However, there is reasonable output:
In [29]: data
Out[29]: {'time_2': {'unit': 's',
'description': '',
'master': 'time_2',
'masterType': 1,
'data': array([5.60005003e-03, ..., 4.75285915e+03])},
'n': {'unit': 'rpm',
'description': 'Engine speed',
'master': 'time_2',
'masterType': 1,
'data': array([0, ..., 0], dtype=uint16)}}
So this means for me there is no problem with the variable 'n'. Is it a problem with cython? I have installed cython version 0.28.5.
data.MDFVersionNumber = 300
Best wishes
Philip
package_list.txt
The text was updated successfully, but these errors were encountered: