Yeah I saw that, but rushed through it. I'll take a closer look. Thanks for helping the n00b.
On Fri, Jun 27, 2014 at 1:17 PM, William Hermans <[email protected]> wrote: > > http://stackoverflow.com/questions/11403932/python-attributeerror-module-object-has-no-attribute-serial > > First hit From : > https://www.google.com/#q=AttributeError%3A+%27Serial%27+object+has+no+attribute+%27SerialTimeoutException%27 > > > On Fri, Jun 27, 2014 at 8:58 AM, John McClaire <[email protected]> > wrote: > >> 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 [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to a topic in the > Google Groups "BeagleBoard" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/beagleboard/B1qWMFAdcsQ/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- *John McClaire | Creative Technologist * -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
