Hey guys,

I'm looking for some help with an error I'm getting. I think it's just a 
syntax sorta thing. 

Here's my python code:

*import* serial

*import* time

*from* subprocess *import* call


ser = serial.Serial( *"/dev/ttyACM0"* , 9600 )


*while* 1:

 *try*:

  ard = ser.readline()

  *if*(*'smile'* *in* ard):

   *print* *'Smiling'*

   call([*"bin/video_player.py -s 80x32 -l bin/smile.mp4"*])


  *elif*(*'laugh'* *in* ard):

   *print* *'Laughing'*

   call([*"bin/video_player.py -s 80x32 -l bin/laugh.mp4"*])


  *elif*(*'wink'* *in* ard):

   *print* *'Winking'*

   call([*"bin/video_player.py -s 80x32 -l bin/wink.mp4"*])


  time.sleep(1)

 *except* ser.SerialTimeoutException:

  *print*(*'Data could not be read'*)

  time.sleep(1)

---------------------------------------------------------------------------------------------------

And here's the error I'm receiving (happens because when I try to call a 
subprocess):

  File "commands.py", line 23, in <module>

    except ser.SerialTimeoutException:

AttributeError: 'Serial' object has no attribute 'SerialTimeoutException'

---------------------------------------------------------------------------------------------------

Thanks for the help!

- John

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to