Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running PirateRadio.py #26

Open
SergioVicent65 opened this issue Mar 1, 2016 · 10 comments
Open

Error running PirateRadio.py #26

SergioVicent65 opened this issue Mar 1, 2016 · 10 comments

Comments

@SergioVicent65
Copy link

I get this error during the execution of PirateRadio.py:

root@raspberrypi:/PirateRadio# python PirateRadio.py
root@raspberrypi:/PirateRadio# ('Playing songs to frequency ', '106.8')
Shuffle is on
Repeat All is on
('Playing ', '/media/pi/16GB/Daft Punk Feat Paul Williams - Touch.mp3')
Traceback (most recent call last):
File "PirateRadio.py", line 179, in
main()
File "PirateRadio.py", line 39, in main
play_songs(files)
File "PirateRadio.py", line 80, in play_songs
subprocess.call(["ffmpeg","-i",filename,"-f","s16le","-acodec","pcm_s16le","-ac", "2" if play_stereo else "1" ,"-ar","44100","-"],stdout=music_pipe_w, stderr=dev_null)
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(_popenargs, *_kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

PS: I'm running the last image of Raspbian, on my Raspberry Pi B+

Help?

Thanks

@dmorawetz
Copy link

Looks like you haven't installed ffmpeg on your RaspberryPi?

@0xicl33n
Copy link

@Morosko ffmpeg does not exist anymore. It has been replaced by avconv. I just ran into this error too

http://askubuntu.com/questions/432542/is-ffmpeg-missing-from-the-official-repositories-in-14-04

I have hacked away at the python code to use avconv and remove some things that were preventing it from working.

https://github.com/0xicl33n/PirateRadio

root@zeru[~/PirateRadio]#python3 PirateRadio.py
Playing songs to frequency  88.9
Shuffle is on
Repeat All is on
Playing  /pirateradio/bignic - Zenzizenzic Soundtrack - 03 girl.flac

@guillermogf
Copy link

ffmpeg does not exist anymore

That's not exactly true. The project still exits and Debian has gone back to using it. In fact it is currently available in the Jessie-backports and Testing repositories.

@dmontenegro
Copy link

It test your repo and the code works but it doesnt send the signal. @0xicl33n Do you know if it works for any Pi? (Ex. Pi3)

@isfanl
Copy link

isfanl commented Aug 23, 2016

i got this error when executing PirateRadio.py

pi@raspberrypi:/PirateRadio $ python PirateRadio.py
Traceback (most recent call last):
File "PirateRadio.py", line 180, in
main()
File "PirateRadio.py", line 35, in main
setup()
File "PirateRadio.py", line 152, in setup
read_config()
File "PirateRadio.py", line 97, in read_config
play_stereo = config.get("pirateradio", 'stereo_playback', fallback=True)
TypeError: get() got an unexpected keyword argument 'fallback'
pi@raspberrypi:
/PirateRadio $

what should i do ?

@in-sympathy
Copy link

I have exactly the same error

@d4m4s74
Copy link
Contributor

d4m4s74 commented Dec 22, 2017

Which version of python are you using? the keyword fallback is in python 3, but not in python 2

@in-sympathy
Copy link

in-sympathy commented Dec 22, 2017 via email

@in-sympathy
Copy link

in-sympathy commented Dec 22, 2017 via email

@in-sympathy
Copy link

Hi guys, sorry for bothering. The script works and says it is playing the files (use regular mp3s), but I can’t find the transmission on any frequency I tried. I use RasPi 3, so maybe there is something that needs to be changed? I also used a 60 cm copper wire as an antenna and connected it to the pin 4 on my RasPi 3. Should the PIN number be the same on RasPi 2 & 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants