-
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
mdf4reader.py fails to get max len on unicode channels #139
Comments
Hi Laurent, |
Hi, Yes it was with python 2.7. I can try with 3.x if you need too. By the way, the file I got (mf4) is full of unicode. I'm not sure but it seems that it fails to export to matlab/xlsx with this unicode values. For instance, I have a numpy array with \u'0' values or \u'Init' which was a pain to output from the numpy array. I will continue my investigation. Unfortunately, I cannot share the file with you but I way look if I can replicate the structure to share it. |
... Just seen you're in Belgium. I'm too. |
mf4 is by specification only unicode and using xml for metadata, this was major change from 3.x to 4.x |
Same with 3.5 |
Try with latest dev branch, it should be fixed |
This could be normal behaviour. If you have unsorted data, like several channel groups per datagroup, 't' channel could be also present several time, so datagroup number and channelgroup numbers are appended to duplicated channel names |
No more feedback since while. |
Hi, it’s working ok. Thanks for the fix |
Line
1873 of mdf4reader.py
maxlen = max([len(str(ref)) for ref in cc_ref])
fails if ref is unicode. Had to change to this to export to Matlab.maxlen = max([len(repr(ref).encode('utf-8')) for ref in cc_ref])
The text was updated successfully, but these errors were encountered: