[lucid] Blueman Pulseaudio plugin cannot be loaded

Bug #535446 reported by mmbossoni
56
This bug affects 10 people
Affects Status Importance Assigned to Milestone
blueman (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: blueman

Package: blueman
Version: 1.21-2ubuntu1
Lucid alpha 3 + updates (until today)

Hi,
I'm trying to enable the pulseaudio plugin for blueman, but the checkbox never become checked.

I'm getting the following on the console

__load_plugin (/usr/bin/blueman-applet:182)
loading <class 'blueman.plugins.applet.PulseAudio.PulseAudio'>
Using gconf config backend
_________
pa_context_event (/usr/lib/python2.6/dist-packages/blueman/main/PulseAudioUtils.py:115)
1
_________
on_load (/usr/lib/python2.6/dist-packages/blueman/plugins/applet/PulseAudio.py:96)
PulseAudio version: 0.9.21-32-g8478
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/blueman/plugins/AppletPlugin.py", line 105, in _load
    self.on_load(applet)
  File "/usr/lib/python2.6/dist-packages/blueman/plugins/applet/PulseAudio.py", line 115, in on_load
    if int(version.split(".")[2]) < 15:
ValueError: invalid literal for int() with base 10: '21-32-g8478'
_________
__load_plugin (/usr/bin/blueman-applet:182)
Failed to load PulseAudio
invalid literal for int() with base 10: '21-32-g8478'
Deleting plugin instance <blueman.plugins.applet.PulseAudio.PulseAudio object at 0x1f1db50>
_________
__del__ (/usr/lib/python2.6/dist-packages/blueman/main/PulseAudioUtils.py:350)
Destroying PulseAudioUtils instance

ProblemType: Bug
Architecture: amd64
Date: Tue Mar 9 22:22:55 2010
DistroRelease: Ubuntu 10.04
InstallationMedia: Kubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100218)
NonfreeKernelModules: wl
Package: blueman 1.21-2ubuntu1
ProcEnviron:
 LANGUAGE=pt_BR:pt:pt_PT
 LANG=pt_BR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-16.25-generic
SourcePackage: blueman
Uname: Linux 2.6.32-16-generic x86_64

Revision history for this message
mmbossoni (mmbossoni-gmail) wrote :
Revision history for this message
mmbossoni (mmbossoni-gmail) wrote :

Hi..
I noticed another problem: while pairing with my device it connects well, but blueman cannot recognizes the connection.
On console blueman output is

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/blueman/Sdp.py", line 280, in on_sdp_changed
    s = pickle.loads(base64.b64decode(value))
  File "/usr/lib/python2.6/pickle.py", line 1374, in loads
    return Unpickler(file).load()
  File "/usr/lib/python2.6/pickle.py", line 858, in load
    dispatch[key](self)
KeyError: 'x'
org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Annoyng say that device isn't connected if it is in fact.

Revision history for this message
xax200 (jacobguy3) wrote :

I also have this bug. Lucid nightly + updates
The error I get when it tries to load the module is:

on_load (/usr/lib/python2.6/dist-packages/blueman/plugins/applet/PulseAudio.py:96)
PulseAudio version: 0.9.21-63-gd3efa-dirty
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/blueman/plugins/AppletPlugin.py", line 105, in _load
    self.on_load(applet)
  File "ka", line 115, in on_load
    if int(version.split(".")[2]) < 15:
ValueError: invalid literal for int() with base 10: '21-63-gd3efa-dirty'

I was able to make a workaround for it though. I just changed line 115 of pulseaudio.py from

  if int(version.split(".")[2]) < 15:

to

  if int(version.split(".")[2].split("-")[1]) < 15:

The script couldn't convert '21-63-gd3efa-dirty' to an int, so i split again at the '-'
Cheers!

Changed in blueman (Ubuntu):
status: New → Confirmed
Revision history for this message
xax200 (jacobguy3) wrote :

Also, you need to change the line at 218 to add the second split. Then it works very nice!

Revision history for this message
KOCMOHABT (kocmo) wrote :

mmbossoni - I ran into the same problem as you. The attached patch fixes it. Save it to /tmp and run the following in the shell:

cd /usr/share/pyshared/blueman
sudo patch -p1 < /tmp/blueman121.on_sdp_changed.patch

Voila!

Revision history for this message
mmbossoni (mmbossoni-gmail) wrote :

Thanks for the patch...
I will try it asaic.

Revision history for this message
mmbossoni (mmbossoni-gmail) wrote :

About the splits I think the workaround will fail if pulseaudio version becomes 0.9.22, without the extra "-something"

Revision history for this message
Ivan Razumov (iarspider) wrote :

Making changes as described in #3+#4 helps. Although I don't understand why did xax200 took 2nd (index 1) part, and not the 1st (index 0) - taking 1st part seems more logical to me! If you take 1st part, you are safe from a future update that removes the -x-y-smth from the end of version string. But if you take 2nd part, you'd better setup an exception handler (that's what mmbossoni talks about in #7)

Revision history for this message
Allo (allo) wrote :

bug still present in maverick. please apply the patch to the ubuntu-package.

Revision history for this message
Serg (boric) wrote :

ubuntu 10.10 2.6.35-25-generic
blueman 1.21
pulseaudio 0.9.21-63-gd3efa-dirty
after editing and patching "PulseAudio.py" bug still present, blueman pulseaudio module is active, but pulseaudio send message: "failed to initialize pulseaudio bluetooth module" and bluetooth audio still don’t work.

Revision history for this message
Mörgæs (moergaes) wrote :

Is this still a problem in 13.10?

Revision history for this message
Mörgæs (moergaes) wrote :

Closing due to age.
If a similar bug appears in 13.10 please open a new report.

Changed in blueman (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.