If you have a question or issue with MNE-Python, please include the following info:
- MNE version: e.g. 0.24.0
- operating system: Windows 10
Please also provide relevant code snippets – ideally a minimal working example (MWE).
To get the correct formatting, paste your Python code, then select it, and click on the Preformatted text toolbar button.
#Setting up ICA
ica = mne.preprocessing.ICA(n_components=20, random_state=97, max_iter=800)
ica.fit(raw, picks = 'eeg')
#ica.exclude = [1, 2] # details on how we picked these are omitted here
#ica.plot_properties()
raw.drop_channels('M1')
raw.drop_channels('M2')
# Removing muscle artefacts
muscle_idx_auto, scores = ica.find_bads_muscle(raw)
ica.plot_scores(scores, exclude=muscle_idx_auto)
ica.exclude = muscle_idx_auto

The running above code is producing an attribute error.
AttributeError: ‘ICA’ object has no attribute ‘find_bads_muscle’