Hi, I am new to MNE and trying to graph 1 second of an OpenBCI bdf file
and the file is 28 KB. When I run the code, there is no error message, but
the popup for the graph is just empty, and nothing happens
(even when waiting for 15 minutes).
Would really appreciate any suggestions.
I have no problem plotting the data, so there is probably something wrong with your setup. How did you install MNE? Did you use the standalone installer?
Thank you Clemens for checking the bdf file, glad that that is not the issue.
I did use the standalone installer for MNE, and perhaps that is the problem?
Looking at the MNE website, they recommend the MNE-Python installer,
so will give that a try…
I uninstalled ThonnyIDE and Python, and then installed Anaconda (which includes Python and Spyder),
and then created a MNE environment:
conda create --channel=conda-forge --strict-channel-priority --name=mne mne
Then opened Spyder and no error message in the console (and updated mne environment as the default)
Then I tried my 1 second bdf code and got an error message. So I went to the
Anaconda Prompt and checked the list of packages in the MNE environment,
and there was mne-base, but no mne. So then went back to the Anaconda Prompt and entered: conda activate mne
conda install -c conda-forge mne
Got a message that some packages would need to be replaced with older versions (including Python), said to continue, and MNE was installed.
But then when I opened Spyder again, there was an error message in the console “python.exe doesn’t have the spyder‑kernels module or the right version of it installed (>= 2.4.0 and < 2.5.0). Without this module is not possible for Spyder to create a console for you.”
So anyway, any solutions you can come up with would be most appreciated !
I think you should try the standalone installer again. I’m pretty sure that you were using a different Python env, because Thonny is not included in the standalone installer.
So I unistalled Anaconda and python and spyder.
Then installed PyCharm, and reinstalled Python, and MNE.
Then within pyCharm created a MNE environment and
started a new project, and added MNE.
Then I ran that code, but got an error message, so with help of Bing, changed to:
So this time no error, it said:
Extracting EDF parameters from C:\MyEEG\OpenBCI-BDF-2023-28KB.bdf…
BDF file detected
Setting channel info structure…
Creating raw.info structure…
Reading 0 … 2199 = 0.000 … 10.995 secs…
Using matplotlib as 2D backend.
Channels marked as bad:
none
Channels marked as bad:
none
Process finished with exit code 0
But what is strange is that what looks like a graph
very briefly pops up and then disappears.
So googled and found someone with the same problem,
and with a solution: