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!
Error with wifi radio
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Error with wifi radio
Sounds like you might have network problems, make sure that's working first
-
- Posts: 10
- Joined: Fri Oct 25, 2013 9:08 pm
Re: Error with wifi radio
Yes I found it was an issue with a proxy as I'm in Canada, got that issue cleared up.
-
- Posts: 2
- Joined: Fri Nov 29, 2013 7:50 pm
Re: Error with wifi radio
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
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
- northirid
- Posts: 2
- Joined: Wed Dec 04, 2013 5:35 am
Re: Error with wifi radio
Glad I'm not alone - everything is working correctly when started manually, just not with the automatic start.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.
Is there anything logged anywhere that I could upload to see what's going awry?
-
- Posts: 2
- Joined: Fri Nov 29, 2013 7:50 pm
Re: Error with wifi radio
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
I don't know what I'm doing. Just lucky and it may be just temporary.
Glen
K1GW
- rap61
- Posts: 9
- Joined: Thu Dec 05, 2013 4:41 pm
Re: Error with wifi radio
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.
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.
-
- Posts: 2
- Joined: Thu Jan 16, 2014 9:26 pm
Re: Error with wifi radio
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?
& no display the display is green with no letters until it stops trying to connect....then turns off..HELP?
-
- Posts: 2
- Joined: Thu Jan 16, 2014 9:26 pm
Re: Error with wifi radio
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
DW
- northirid
- Posts: 2
- Joined: Wed Dec 04, 2013 5:35 am
Re: Error with wifi radio
I found a workaround, if nothing else!
Adding to rc.local AFTER the section where it displays the IP address got it running for me.
Adding
Code: Select all
sleep 10s
- relicstone
- Posts: 4
- Joined: Fri Aug 15, 2014 6:38 pm
Re: Error with wifi radio
im having the same issue,
mine fails at line 190 and 288
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
- lfzguud
- Posts: 18
- Joined: Sun Aug 10, 2014 8:52 pm
Re: Error with wifi radio
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]
- relicstone
- Posts: 4
- Joined: Fri Aug 15, 2014 6:38 pm
Re: Error with wifi radio
Edit pianobar config file and set autostart station to one of your stations. I set mine to 24. My quickmix channel number.
- darin1701
- Posts: 4
- Joined: Fri Jul 22, 2016 12:59 pm
Re: Error with wifi radio
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?
Please be positive and constructive with your questions and comments.