I have the following error message:
Traceback (most recent call last):
File “”, line 57, in
AttributeError: module ‘serial’ has no attribute ‘Serial’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “”, line 59, in
AttributeError: module ‘serial’ has no attribute ‘SerialException’
Iddeas on how to solve this problem
MRAB
(Matthew Barnett)
January 11, 2026, 4:06pm
2
Which package did you install?
If you installed serial, then that’s the wrong one - it handles serialisation.
The package you need is pyserial.
Thanks
pyserial 3.5 is installed should I uninstall “serial”
ser = serial.serial(serialPort, baudRate, timeout=timeout) # Open serial port
ser.reset_input_buffer() # Clear input buffer to remove stale data
except serial.serialException as e:
msg = QtWidgets.QMessageBox()
MRAB
(Matthew Barnett)
January 11, 2026, 4:15pm
5
If you installed the serial package by mistake, you might as well uninstall it. I would, just to be tidy!
done .. serial uninstalled
now have the following error
“QWidget: Must construct a QApplication before a QWidget”
Does this need a new request?
MRAB
(Matthew Barnett)
January 11, 2026, 4:51pm
7
That’s a different issue. Please start a new thread for it.