Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Serial Communication Error
#1
Hi,

I am new to python. I was facing an issue while using serial communication. I am sending 1 byte data from a device to the raspberry pi board using serial to USB converter. The error I was getting is given below
Attribute error: 'Serial' object has no attribute 'inwaiting'

The program is given below,

import serial

ser = serial.Serial(port='dev/ttyUSB0',baudrate=9600)
try:
data = ser.read()
response=ser.read(ser.inwaiting)
print(data)

finally:
ser.close()


Please reply as soon as possible

Thank you,
Alphy
Reply
#2
ser.inWaiting() not ser.inwaiting.

Use proper code tags in this forum.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pyserial/serial "has no attribute 'Serial' " gowb0w 9 3,297 Aug-24-2023, 07:56 AM
Last Post: gowb0w
  packet radio communication EmpireAndrew 1 2,152 Nov-01-2019, 06:35 PM
Last Post: micseydel
  WiFi communication Milad 2 2,418 Sep-07-2019, 11:53 AM
Last Post: ndc85430
  Serial communication with raspberry pi 3B and Xbee kj7 0 2,145 Mar-25-2019, 03:39 AM
Last Post: kj7
  pi3 serial communication tony1812 0 2,126 Sep-23-2018, 10:29 PM
Last Post: tony1812
  python-osc communication fauveboy 10 10,088 Jul-23-2018, 07:49 PM
Last Post: buran
  serial communication write(comand) and read(result) ricardons 1 2,876 Mar-01-2018, 04:26 PM
Last Post: mpd
  Parsing serial data "Attribute Error" Zeberoff 2 3,382 Jan-04-2018, 09:57 PM
Last Post: nilamo
  Serial communication with a board Bokka 2 5,307 Dec-07-2017, 07:34 AM
Last Post: Bokka
  code pattern for process communication Skaperen 12 8,366 Oct-08-2017, 03:14 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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