I am trying to connect to the serial ports a Raspberry Pi 3 Model B running Raspbian through Python.
import serial
works fine but ser = serial.Serial("dev/ttyAMA0", baudrate=9600)
yields this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Serial'
serial.py
at any point and put it in an import location (e.g. your current directory)? That would likely break things. Also, how did you install pySerial?serial.py
at any point and I have deleted every .pyc file and usedfrom serial import serial
as I am importing the module not the class still getting the error.