I am learning Python and need to monitor a serial port.
i am using Pycharm with the following code.
import serial
ser = serial.Serial('com6', 9600)
while True:
s = ser.read(10000)
print(s)
This gives the error: AttributeError: module 'serial' has no attribute 'Serial'
PS. I have installed "serial" in pycharms python interpreter
Not sure what is wrong...
I am learning Python and need to monitor a serial port.
i am using Pycharm with the following code.
import serial
ser = serial.Serial('com6', 9600)
while True:
s = ser.read(10000)
print(s)
This gives the error: AttributeError: module 'serial' has no attribute 'Serial'
PS. I have installed "serial" in pycharms python interpreter
Not sure what is wrong...
I found the solution.
So, in PyCharm you need to install pyserial not serial, even though in code you call it as as serial! Of course!!!
serial.py
anywhere in the same folder ? – Ahmed AEK Commented Nov 16, 2024 at 14:38