Recently I had same error. Reason for that I came in thus post.
I have using spyder version 6, installed with flatpak, before I used spyder 5.4.2 (native of debian's repositories).
Was strange because an old script worked fine, then I thinked if proof the same script in Jupyter Notebook? and no problem! then I proof in Pyzo, zero problem, further I decided reinstall spyder 5.4.2, and surprise, it work:
import serial
puerto_serial = '/dev/ttyACM0'
baud_rate = 9600
timeout = 10
arduino = serial.Serial(puerto_serial, baud_rate, timeout=timeout)
My humble opinion, if is problem of IDE?