- MNE-Python version: 0.23.4
- operating system: Mac OS 11.6
Hello,
I am working through the example:
Instead of the lines:
raw = mne.io.read_raw_edf(misc_path + '/seeg/sample_seeg.edf')
raw.info['bads'].extend([ch for ch in raw.ch_names if ch not in ch_names])
raw.load_data()
raw.drop_channels(raw.info['bads'])
raw.crop(0, 2) # just process 2 sec of data for speed
I put:
info = mne.create_info(ch_names=ch_names, sfreq=512)
raw = mne.io.RawArray(np.zeros((len(ch_names), 10)), info)
then, at the line:
raw.set_montage(montage)
I get the following error:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/opt/anaconda3/envs/mne/lib/python3.9/site-packages/IPython/core/formatters.py in __call__(self, obj)
343 method = get_real_method(obj, self.print_method)
344 if method is not None:
--> 345 return method()
346 return None
347 else:
~/opt/anaconda3/envs/mne/lib/python3.9/site-packages/mne/io/base.py in _repr_html_(self, caption)
1761
1762 def _repr_html_(self, caption=None):
-> 1763 basenames = [os.path.basename(f) for f in self._filenames]
1764 m, s = divmod(self._last_time - self.first_time, 60)
1765 h, m = divmod(m, 60)
~/opt/anaconda3/envs/mne/lib/python3.9/site-packages/mne/io/base.py in <listcomp>(.0)
1761
1762 def _repr_html_(self, caption=None):
-> 1763 basenames = [os.path.basename(f) for f in self._filenames]
1764 m, s = divmod(self._last_time - self.first_time, 60)
1765 h, m = divmod(m, 60)
~/opt/anaconda3/envs/mne/lib/python3.9/posixpath.py in basename(p)
140 def basename(p):
141 """Returns the final component of a pathname"""
--> 142 p = os.fspath(p)
143 sep = _get_sep(p)
144 i = p.rfind(sep) + 1
TypeError: expected str, bytes or os.PathLike object, not NoneType
Could someone help me understand what is going on? Thank you!