Closed Daniel-Ebert closed 8 years ago
Try the following: Edit File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/listener.py", line 110 to:
b'4sl', socket.inet_aton(address.encode('ascii', 'ignore'), socket.INADDR_ANY)
Added a "b" before "'4sl'" and added a ".encode('ascii', 'ignore')" after "address"
Okay, thanks so far.
I've edited the line to this here : b'4sl', socket.inet_aton(address.encode('ascii', 'ignore')), socket.INADDR_ANY)
what removed the second error. Now it still looks like this
pulseaudio-dlna
11-21 12:23:36 pulseaudio_dlna.notification ERROR notify2 could not be initialized! Notifications will most likely not work.
11-21 12:23:37 pulseaudio_dlna.application INFO Using version: 0.4.7
11-21 12:23:37 pulseaudio_dlna.application INFO Using localhost: 192.168.2.111:8080
11-21 12:23:37 pulseaudio_dlna.application INFO Encoder settings:
11-21 12:23:37 pulseaudio_dlna.application INFO
EDIT- Okay sry, now there's left pulseaudio-dlna --port 8082
11-21 12:28:15 pulseaudio_dlna.notification ERROR notify2 could not be initialized! Notifications will most likely not work.
11-21 12:28:16 pulseaudio_dlna.application INFO Using version: 0.4.7
11-21 12:28:16 pulseaudio_dlna.application INFO Using localhost: 192.168.2.111:8082
11-21 12:28:16 pulseaudio_dlna.application INFO Encoder settings:
11-21 12:28:16 pulseaudio_dlna.application INFO
Oh so okay, I'm really sorry about my incompetence. pulseaudio wasn't installed ;)
Thanks really much for your help!
With best regards
Daniel
Okay, so I've installed pulseaudio now, but now I've got another error during the discovery of devices 11-21 13:09:36 pulseaudio_dlna.pulseaudio INFO Could not get default sink. Perhaps there is no one set? Process Process-3: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(_self._args, *_self._kwargs) File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 516, in run self._connect(signals) File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 73, in _connect sink = PulseSinkFactory.new(self.bus, sink_path) File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 316, in new label=self._convert_bytes_to_unicode(description_bytes), File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 196, in _convert_bytes_to_unicode name += struct.pack('<B', b) TypeError: Struct() argument 1 must be string, not unicode 11-21 13:09:46 pulseaudio_dlna.listener INFO Discovery complete.
No problem. Don't hesitate to ask.
Edit File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 196, in and prefix the string with "b" name += struct.pack(b'<B', b)
I have no idea why the librarys on your RPi do not accept Unicode... On every other distribution I have seen they do accept Unicode.
Oh thank you very much. That finally did the trick.
Best regards Daniel
Hello again,
yesterday I've already were able to run pulseaudio-dlna sucessfully on my raspberry PI. Today, I always get the error: Added the device "marantz:NR1602". 11-22 13:33:23 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink2" 11-22 13:33:23 pulseaudio_dlna.listener INFO Discovery complete. 11-22 13:33:24 pulseaudio_dlna.pulseaudio INFO _async_handle_sink_update /org/pulseaudio/core1/sink2 11-22 13:33:24 pulseaudio_dlna.pulseaudio INFO Instructing the device "marantz:NR1602" to play ... 11-22 13:33:34 pulseaudio_dlna.plugins.upnp.renderer ERROR REGISTER command - Could no connect to http://192.168.2.101:8080/AVTransport/ctrl. Connection timeout. 11-22 13:33:34 pulseaudio_dlna.plugins.upnp.renderer ERROR "marantz:[NR1602]" registering failed! 11-22 13:33:34 pulseaudio_dlna.pulseaudio ERROR The device "marantz:NR1602" failed to play! (408) 11-22 13:33:34 pulseaudio_dlna.notification INFO notify2 failed to display: Device "marantz:NR1602" - The device failed to start playing. (408). Your streams were switched back to bcm2835 ALSA Analog Stereo 11-22 13:33:34 pulseaudio_dlna.pulseaudio INFO _async_handle_sink_update /org/pulseaudio/core1/sink2 finished! 11-22 13:33:34 pulseaudio_dlna.pulseaudio INFO on_device_updated "/org/pulseaudio/core1/sink0" 11-22 13:33:36 pulseaudio_dlna.pulseaudio INFO _async_handle_sink_update /org/pulseaudio/core1/sink0 11-22 13:33:36 pulseaudio_dlna.pulseaudio INFO _async_handle_sink_update /org/pulseaudio/core1/sink0 finished! Cause I've got some issues I reinstalled pulseaudio and tried to remake the configuration I've made yesterday. As you see it does not work. Where could the error probably be ?
Regards Daniel
Could you re-run the application via the following command?
pulseaudio-dlna --debug 2>&1 | tee -a debug.log
This will create a debug.log in the current directory. Could you paste it somewhere and link it here?
Okay, it was a problem related to my Marantz device. After restarting the device completeley it works again ;). Thanks anyways for your help !
Ok, no problem. Some devices need to be in a certain mode so that control commands work. E.g. yahama devices needs to be in server mode.
When I start it, I get the following: pulseaudio-dlna --debug 11-21 11:36:04 pulseaudio_dlna.rules DEBUG Loaded rules: 11-21 11:36:04 pulseaudio_dlna.rules DEBUG DISABLE_DEVICE_STOP = <class 'pulseaudio_dlna.rules.DISABLE_DEVICE_STOP'> 11-21 11:36:04 pulseaudio_dlna.rules DEBUG FAKE_HTTP_CONTENT_LENGTH = <class 'pulseaudio_dlna.rules.FAKE_HTTP_CONTENT_LENGTH'> 11-21 11:36:04 pulseaudio_dlna.rules DEBUG REQUEST_TIMEOUT = <class 'pulseaudio_dlna.rules.REQUEST_TIMEOUT'> 11-21 11:36:04 pulseaudio_dlna.notification ERROR notify2 could not be initialized! Notifications will most likely not work. 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG Loaded encoders: 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.AacEncoder'> 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.FlacEncoder'> 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.L16Encoder'> 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.LameEncoder'> 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.NullEncoder'> 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.OggEncoder'> 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.OpusEncoder'> 11-21 11:36:04 pulseaudio_dlna.encoder DEBUG <class 'pulseaudio_dlna.encoders.WavEncoder'> 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG Loaded codecs: 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG aac = <class 'pulseaudio_dlna.codecs.AacCodec'> 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG flac = <class 'pulseaudio_dlna.codecs.FlacCodec'> 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG l16 = <class 'pulseaudio_dlna.codecs.L16Codec'> 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG mp3 = <class 'pulseaudio_dlna.codecs.Mp3Codec'> 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG ogg = <class 'pulseaudio_dlna.codecs.OggCodec'> 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG opus = <class 'pulseaudio_dlna.codecs.OpusCodec'> 11-21 11:36:05 pulseaudio_dlna.codecs DEBUG wav = <class 'pulseaudio_dlna.codecs.WavCodec'> 11-21 11:36:05 pulseaudio_dlna.application INFO Using version: 0.4.7 11-21 11:36:05 pulseaudio_dlna.application INFO Using localhost: 192.168.2.111:8080 11-21 11:36:05 pulseaudio_dlna.application INFO Encoder settings: 11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO Codec settings:
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
11-21 11:36:05 pulseaudio_dlna.application INFO
Process Process-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, _self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 516, in run
self._connect(signals)
File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 52, in _connect
self.bus = self._get_bus()
File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/pulseaudio.py", line 98, in _get_bus
stdout=subprocess.PIPE).communicate()
File "/usr/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, _self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/listener.py", line 91, in run
self._multicast_struct(self.SSDP_ADDRESS))
File "/usr/local/lib/python2.7/dist-packages/pulseaudio_dlna/listener.py", line 110, in _multicast_struct
'4sl', socket.inet_aton(address), socket.INADDR_ANY)
TypeError: Struct() argument 1 must be string, not unicode
I've got really no idea how to fix this.
Thanks in advance for help
Daniel