Error with wifi radio

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
davedobson
 
Posts: 10
Joined: Fri Oct 25, 2013 9:08 pm

Error with wifi radio

Post by davedobson »

Hi all, very much a newbie here but hoping to get some help - I've been following the tutorial found here: http://learn.adafruit.com/pi-wifi-radio with a bit of luck. I've got the led screen working running the sample tests and I've got a stream of music playing but only if I run the sudo pianobar command and type in my user/pass. if I try to run the sudo python PiPhi.py command to actually use the led and controls I get an error and it won't start up:

pi@pandora ~/Python-WiFi-Radio $ sudo python PiPhi.py
Spawning pianobar...
Receiving station list...
Traceback (most recent call last):
File "PiPhi.py", line 287, in <module>
pianobar.expect('Get stations... Ok.\r\n', timeout=30)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1311, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1325, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1396, in expect_loop
raise EOF (str(e) + '\n' + str(self))
pexpect.EOF: End Of File (EOF) in read_nonblocking(). Exception style platform.
<pexpect.spawn object at 0xb6ab2970>
version: 2.3 ($Revision: 399 $)
command: /usr/bin/sudo
args: ['/usr/bin/sudo', '-u', 'pi', 'pianobar']
searcher: searcher_re:
0: re.compile("Get stations... Ok.
")
buffer (last 100 chars):
before (last 100 chars): ... Network error: Connection refused.
/!\ Cannot start eventcmd. (No such file or directory)

after: <class 'pexpect.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 2780
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1


...any thoughts are appreciated!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Error with wifi radio

Post by adafruit »

Sounds like you might have network problems, make sure that's working first

davedobson
 
Posts: 10
Joined: Fri Oct 25, 2013 9:08 pm

Re: Error with wifi radio

Post by davedobson »

Yes I found it was an issue with a proxy as I'm in Canada, got that issue cleared up.

GlenK1GW
 
Posts: 2
Joined: Fri Nov 29, 2013 7:50 pm

Re: Error with wifi radio

Post by GlenK1GW »

I have this exact same problem but I have no Idea how to solve it.

My network seems fine. pianobar works perfectly when run from the command line. I can ssh with no problem. The normal computing activity on my home network work fine.

What do I do? Where do I start.

Any assistance would be graciously accepted.

Thanks,
Glen, K1GW

User avatar
northirid
 
Posts: 2
Joined: Wed Dec 04, 2013 5:35 am

Re: Error with wifi radio

Post by northirid »

GlenK1GW wrote:My network seems fine. pianobar works perfectly when run from the command line. I can ssh with no problem. The normal computing activity on my home network work fine.
Glad I'm not alone - everything is working correctly when started manually, just not with the automatic start.

Is there anything logged anywhere that I could upload to see what's going awry?

GlenK1GW
 
Posts: 2
Joined: Fri Nov 29, 2013 7:50 pm

Re: Error with wifi radio

Post by GlenK1GW »

Mine works now. In PiPhi.py I changed timeout from 30 to 60 in the line that begins "pianobar.expect('Get stations... Ok. .......

I don't know what I'm doing. Just lucky and it may be just temporary.
Glen
K1GW

User avatar
rap61
 
Posts: 9
Joined: Thu Dec 05, 2013 4:41 pm

Re: Error with wifi radio

Post by rap61 »

I get same error when PiPhi.py launches during boot. When I ssh into system I can execute $sudo PiPhi.py & and it runs w/o issue.

It may be a timing issue with network being available. I've connecting via WiFi using interfaces and wpa_supplicant.conf for parameters.

I will try modifying the timeout parameter.

dw361
 
Posts: 2
Joined: Thu Jan 16, 2014 9:26 pm

Re: Error with wifi radio

Post by dw361 »

Have you guys figured out how to fix this issue.I have the exact same result! I tried extending the time from 30 sec to 60 and then to 120,,,,same results. PIANOBAR plays from sudo python...but not Piphi.py
& no display the display is green with no letters until it stops trying to connect....then turns off..HELP?

dw361
 
Posts: 2
Joined: Thu Jan 16, 2014 9:26 pm

Re: Error with wifi radio

Post by dw361 »

I adjusted the contrast and I do have " YOUR CURRENT IP ADDRESS IS 192.168.X.X SO THE DISPLAY IS WORKING..,but no radio
DW

User avatar
northirid
 
Posts: 2
Joined: Wed Dec 04, 2013 5:35 am

Re: Error with wifi radio

Post by northirid »

I found a workaround, if nothing else!

Adding

Code: Select all

sleep 10s
to rc.local AFTER the section where it displays the IP address got it running for me.

User avatar
relicstone
 
Posts: 4
Joined: Fri Aug 15, 2014 6:38 pm

Re: Error with wifi radio

Post by relicstone »

im having the same issue,

Code: Select all

pi@PandoraPI ~/Python-WiFi-Radio $ sudo python PiPhi.py
Spawning pianobar...
Receiving station list...
Traceback (most recent call last):
  File "PiPhi.py", line 288, in <module>
    stationList, stationIDs = getStations()
  File "PiPhi.py", line 190, in getStations
    pianobar.expect('Select station: ', timeout=10)
  File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1311, in expect
    return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
  File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1325, in expect_list
    return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
  File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1409, in expect_loop
    raise TIMEOUT (str(e) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
<pexpect.spawn object at 0xb6c13870>
version: 2.3 ($Revision: 399 $)
command: /usr/bin/sudo
args: ['/usr/bin/sudo', '-u', 'pi', 'pianobar']
searcher: searcher_re:
    0: re.compile("Select station: ")
TIME: -03:35/03:42
TIME: -03:35/03:42
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 2196
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
mine fails at line 190 and 288

User avatar
lfzguud
 
Posts: 18
Joined: Sun Aug 10, 2014 8:52 pm

Re: Error with wifi radio

Post by lfzguud »

Same problem. It gets to Receiving Station List then dies off. See below

Code: Select all

pi@mervin ~/Python-WiFi-Radio $ sudo python PiPhi.py
Spawning pianobar...
Receiving station list...
Traceback (most recent call last):
  File "PiPhi.py", line 288, in <module>
    stationList, stationIDs = getStations()
  File "PiPhi.py", line 190, in getStations
    pianobar.expect('Select station: ', timeout=60)
  File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1311, in expect
    return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
  File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1325, in expect_list
    return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
  File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1409, in expect_loop
    raise TIMEOUT (str(e) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
<pexpect.spawn object at 0x1a23af0>
version: 2.3 ($Revision: 399 $)
command: /usr/bin/sudo
args: ['/usr/bin/sudo', '-u', 'pi', 'pianobar']
searcher: searcher_re:
    0: re.compile("Select station: ")
TIME: -02:53/03:50
TIME: -02:53/03:50
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 1849
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
/[code]

User avatar
relicstone
 
Posts: 4
Joined: Fri Aug 15, 2014 6:38 pm

Re: Error with wifi radio

Post by relicstone »

Edit pianobar config file and set autostart station to one of your stations. I set mine to 24. My quickmix channel number.

User avatar
darin1701
 
Posts: 4
Joined: Fri Jul 22, 2016 12:59 pm

Re: Error with wifi radio

Post by darin1701 »

relicstone wrote:Edit pianobar config file and set autostart station to one of your stations. I set mine to 24. My quickmix channel number.

How do you find the station number?

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”