Civlo85 / gsmHat

Using the Waveshare GSM/GPRS/GNSS Hat for Raspberry Pi with Python
MIT License
61 stars 26 forks source link

AttributeError: module 'serial' has no attribute 'Serial' #3

Open patrickpoirier51 opened 3 years ago

patrickpoirier51 commented 3 years ago

Hello,

Just loaded on RPI3 with fresh raspios-buster image

python3 test.py Traceback (most recent call last): File "test.py", line 2, in gsm = GSMHat('/dev/ttyS0', 115200) File "/home/pi/.local/lib/python3.7/site-packages/gsmHat/gsmHat.py", line 74, in init self.connect() File "/home/pi/.local/lib/python3.7/site-packages/gsmHat/gsmHat.py", line 78, in connect self.ser = serial.Serial(self.port, self.__baudrate) AttributeError: module 'serial' has no attribute 'Serial'

tried sudo apt-get remove python3-serial pip3 install pyserial --upgrade

same error

OK resolved ==== pip3 uninstall serial

Deon-Louw commented 2 years ago

Get pyserial from here: https://github.com/pyserial/pyserial/tree/master/serial and replace it with the content in: /home/pi/.local/lib/python3.7/site-packages/serial Remember to back up 1st

HubertFeldmann commented 10 months ago

do this: pip uninstall serial pip install pyserial