TypeError: 'float' object does not support item assignment

  • MNE-Python version: 0.22.0
  • operating system: Windows & Mac

Hi all,

I was trying to load in a hypnogram edf file using python. The data is directly from PhysioNet (https://www.physionet.org/content/sleep-edfx/1.0.0/). For example, when I tried to process file SC4001EC-Hypnogram.edf using my code below.

import mne
data = mne.io.read_raw_edf(localpath)
df = data.to_data_frame()

I got a error message saying “TypeError: ‘float’ object does not support item assignment”.
Does anyone else run into similar issues before?

Thank you.

This looks like a bug in our reader. Please open an issue in our GitHub repository and I’ll try to fix it.

2 Likes

Thanks Clemens. I will open an issue on Github.