Error msg. 'serial' no attribute 'Serial'

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

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()

If you installed the serial package by mistake, you might as well uninstall it. I would, just to be tidy! :slight_smile:

done .. serial uninstalled

now have the following error

“QWidget: Must construct a QApplication before a QWidget”

Does this need a new request?

That’s a different issue. Please start a new thread for it.