Open rb643 opened 6 years ago
Sorry that it took me so long to look at this.
Are you still running the notebook in the same folder as the folder data
?
(and do you have a different package called data
installed by any chance?)
Yep still the same notebook, only thing is I switched to a newer versions of python now (and Ubuntu). No package called data that I'm aware of
What happens when you just do:
import data
hasattr(data, 'raws')
?
On Mon, Mar 26, 2018 at 5:51 PM, rb643 notifications@github.com wrote:
Yep still the same notebook, only thing is I switched to a newer versions of python now (and Ubuntu). No package called data that I'm aware of
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/rb643/resting_state_eeg/issues/11#issuecomment-376234825, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5yCbWwUzVu4zHJIKAO7zxFtQWlugVwks5tiRyngaJpZM4SaMJ_ .
File "data/init.py", line 40 warnings.warn(f"Expected 4 events, but got {eventarray.shape[0]}.") ^ SyntaxError: invalid syntax
And you said you switched to newer versions of python? What do you get when you type python --version
at the terminal?
f-strings are python 3.6 I think...
Not behind my desktop until next week, but yes I'm using Python 3.6 since I think
actually on my desktop I have custom anaconda 2.7.11 apparently :)
And with "import data" I just get an import error that says there is no module called data..
Hmm. So on 2.7 it shouldn't work I believe - just because it uses "relative imports", which are a new python 3 feature as far as I know.
Frustrating! I'll take another look.
With python 3.6 I still get the same error though ("no module named data")
Oh wait, I didn't realise notebooks reverts to the default python kernel
Does it work with the 3.6 kernel?
(I tend to start jupyter notebook
after I activate the right environment to make sure it always uses the right kernel)
Yeah I tried that, but when I print sys.info its still saying its on the 2.7 kernel.. So will probs need to check my version control..
Well that took longer than expected, but apparently installing mayavi via pip automatically downgrades python back to 2.7 :) Solved that, but got a new one now. In Python 3.6 there seems to be no raws attribute.. Is it possible MNE doesn't support 3.6?
Ok turns out the event array shape is far from consistent and that seems to be what is causing at least some of the errors... In some cases there are 5 dimensions and in some cases (I think the newer ones) there are a few with 2 dimensions (probably cause we fixed the triggers codes later). So the event array renaming doesn't work (in the init file).. Any smart suggestions on how to make the naming more adaptive?
Also, it doesn't really seem to be reading the channel triggers correctly anyway as they don't show up in the eventarray...
For some reason the first reading step now gives an error when reading in all bdf files...
ImportError Traceback (most recent call last)