Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mne/export/_eeglab.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _export_raw(fname, raw):
# remove extra epoc and STI channels
drop_chs = ["epoc"]
# filenames attribute of RawArray is filled with None
if raw.filenames[0] and not (raw.filenames[0].endswith(".fif")):
if raw.filenames[0] and not (str(raw.filenames[0]).endswith(".fif")):
drop_chs.append("STI 014")

ch_names = [ch for ch in raw.ch_names if ch not in drop_chs]
Expand Down
4 changes: 3 additions & 1 deletion mne/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ def __init__(
# STI 014 channel is native only to fif ... for all other formats
# this was artificially added by the IO procedure, so remove it
ch_names = list(info["ch_names"])
if ("STI 014" in ch_names) and not (self.filenames[0].endswith(".fif")):
if ("STI 014" in ch_names) and not (
str(self.filenames[0]).endswith(".fif")
):
ch_names.remove("STI 014")

# Each channel in the data must have a corresponding channel in
Expand Down