Python Forum
how do i fix this problem - IndentationError?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do i fix this problem - IndentationError?
#9
Hi,

Same error on the following code:

import serial #seria lib
import numpy #numpy lib
import matplotlib.pyplot as plt #matplot lib
from drawnow import *

arduinoData = serial.Serial('com20', 9600)


while True: #loops forever
     while (arduinoData.inWaiting()==0): #Wait for data
        pass #does nothing
    arduinoString = arduinoData.readline()
    print (arduinoString)
Please help.
I tried adding an argument to arduinoData.readline(0)
same error on same line.
Reply


Messages In This Thread
RE: how do i fix this problem??? - by Larz60+ - Mar-12-2019, 09:04 AM
RE: how do i fix this problem??? - by perfringo - Mar-12-2019, 09:13 AM
RE: how do i fix this problem - IndentationError? - by carloszoom3000 - Apr-04-2019, 09:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  IndentationError: unexpected indent dee 3 2,322 May-02-2022, 02:15 AM
Last Post: dee
  error "IndentationError: expected an indented block" axa 4 2,922 Sep-08-2020, 02:09 PM
Last Post: ibreeden
  IndentationError: unexpected indent jk91 1 2,390 Feb-27-2020, 08:56 PM
Last Post: buran
  IndentationError jagannath 1 2,474 Nov-04-2019, 07:41 AM
Last Post: buran
  IndentationError: expected an indented block ryder5227 2 2,612 Sep-27-2019, 06:59 PM
Last Post: jefsummers
  IndentationError on installed package evvvonder 3 3,042 Jun-29-2019, 10:30 PM
Last Post: Gribouillis
  Indentationerror Jack_Sparrow 4 4,214 May-16-2018, 05:50 PM
Last Post: Jack_Sparrow
  IndentationError message could be confusing to new programmers insearchofanswers87 1 2,345 May-16-2018, 05:05 PM
Last Post: Larz60+
  IndentationError: unexpected indent (Python) segs 8 17,281 Aug-11-2017, 03:13 PM
Last Post: segs

Forum Jump:

User Panel Messages

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