Crash on "blueman.Constants import *"

Bug #338181 reported by Jason Allen on 2009-03-05
Affects Status Importance Assigned to Milestone

Bug Description

blueman: 1.02, from "deb jaunty main" (installed via "apt-get install blueman")

kernel: 2.6.28-8-generic, x86_64

jason@phantom-laptop:~$ /usr/bin/blueman-applet
Traceback (most recent call last):
  File "/usr/bin/blueman-applet", line 37, in <module>
    from blueman.Constants import *
ImportError: No module named blueman.Constants

Above "blueman.Constants import *" crash occurs for all /usr/bin/blueman-* binaries.

cschramm (cschramm) wrote :

I've had a similar problem, which turned out to be due to /usr/lib/python-2.5/site-packages/blueman not only containing, but also from some earlier blueman version(?). Removing the fixed the issue. Maybe that's a python bug, maybe a feature. Don't think it's blueman related, but since I'm totally unfamiliar with python, I don't know.

You should ls your /usr/lib/python-2.5/site-packages/blueman to see whether that could be your problem.

Jason Allen (jallen) wrote :

Thanks for the advice Shakademus.

I have no /usr/lib/python-2.5/site-packages/blueman/ directory and a "locate" and "locate blueman" failed to find any blueman directory, within the /usr/lib/python* tree.

If blueman is to create a "blueman/" within the /usr/lib/python* tree, then it would appear that it is not doing this within the jaunty package/repository.

I checked blueman's WebSVN, put could not find (possibly a lack of understanding?) a file.

cschramm (cschramm) wrote :

Just reviewed the packages. The directory for 1.02 is /usr/share/pyshared/blueman.

Pooh (andrew-pazniak) wrote :

I have the same behavior in Jaunty under KDE.

Jason Allen (jallen) wrote :

Just checked /usr/share/pyshared/blueman (thanks Shakademus), and only have one file, contents of which is ...

ICON_PATH = "/usr/share/blueman/icons"
UI_PATH = "/usr/share/blueman/ui"
DHCP_CONFIG_FILE = "/etc/dhcp3/dhcpd.conf"

DEF_BROWSE_COMMAND = "nautilus --browser obex://[%d]"

import os
import gettext

gettext.bindtextdomain("blueman", "/usr/share/locale")

if os.path.exists("../apps") and os.path.exists("../data"):
        BIN_DIR = "./"
        ICON_PATH = "../data/icons"
        UI_PATH = "../data/ui"
--- End ---

Not sure why I'm getting this problem ??

I had this issue and it was the result of files being installed in /usr/share/lib/python2.6/site-packages/ and /usr/share/lib64/python2.6/site-packages/ as opposed to /usr/lib/python2.6/site-packages/ and /usr/lib64/python2.6/site-packages/. Note the lack of a share/ component in the directories, as the original directories aren't on my python path. This probably needs fixing so things go in the right places - I'm more than happy to test.

For reference I'm on Fedora Rawhide x86_64 with kernel 2.6.29-0.258.rc8.git2.fc11.x86_64.

Johnylin (chernyeu) wrote :

Hi, I had the same error message as you, and I found out that if I use python2.5 instead of python2.6, the problem is no more existed.
I can now try to connect my computer to other devices via bluetooth by blueman, but it still failed with another problem. At least, it goes for a little step. :)

Hope this information will help.

It's my first post, so I don't know if this post is appropriate.

Pavel Mlčoch (pavkamlc) wrote :

For me helps overwrite python by python2.5 in first line this scripts.

RogerS (roger-storvik) wrote :

I got this problem when I wrongly (when using 9.04) chose intrepid instead of jaunty in software sources..
Bummer.. :)

sector (sector-iki) wrote :

I also wasted hours of debugging because of this "intrepid" issue. Maybe you could update the instructions about adding a repository?

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

Other bug subscribers