Python Forum
pyserial/serial "has no attribute 'Serial' "
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pyserial/serial "has no attribute 'Serial' "
#4
(Aug-23-2023, 06:28 PM)deanhystad Wrote: How did you reinstall the pyserial library?

Please show entire error trace. I would also like to know how you are running the program. Command line? IDE (if so, which)?

My first guess is you are not importing pyserial in the Python you are using to run the program. Are you using a virtual environment? Did you activate the environment before using pip install (assuming you used pip install)?

yes i did reinstall. Several times

File "c:\Users\Mérill\Desktop\pytharduino2\ardseri.py3", line 2, in <module>
    serial_port = serial.Serial(port = "COM3", baudrate = 9600)
                  ^^^^^^^^^^^^^
AttributeError: module 'serial' has no attribute 'Serial'
Reply


Messages In This Thread
RE: pyserial/serial "has no attribute 'Serial' " - by gowb0w - Aug-23-2023, 06:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Writing to two different serial ports independent of each other Aggie64 6 1,744 Dec-11-2024, 10:51 PM
Last Post: deanhystad
  sending strings to arduino over serial/accessing DLLs HeWhoHas 0 909 Nov-09-2024, 06:01 PM
Last Post: HeWhoHas
  PC why serial code = converting to ascii ? trix 11 2,957 Oct-12-2024, 11:10 PM
Last Post: deanhystad
  PyQt5 - issue of delay in overall performance & user interface while using serial COM thiru 0 987 Jun-18-2024, 08:34 AM
Last Post: thiru
  Waiting for input from serial port, then move on KenHorse 3 4,505 Apr-17-2024, 07:21 AM
Last Post: DeaD_EyE
  MCU reboots after opening Serial port when ran from Raspberry PI zazas321 3 1,912 Mar-19-2024, 09:02 AM
Last Post: zazas321
  importing serial Fklein23 2 4,349 Jul-05-2023, 01:32 PM
Last Post: deanhystad
  Serial Port As Global Prasanjith 2 3,120 Mar-23-2023, 08:54 PM
Last Post: deanhystad
  Python Serial: How to read the complete line to insert to MySQL? sylar 1 1,709 Mar-21-2023, 10:06 PM
Last Post: deanhystad
Star Pyserial not reading serial.readline fast enough while using AccelStepper on Arduino MartyTinker 4 9,180 Mar-13-2023, 04:02 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020