* [Bluez-users] Pyhton - ImportError: No module named dbus
@ 2007-04-01 17:02 Robert Rawlins
0 siblings, 0 replies; 5+ messages in thread
From: Robert Rawlins @ 2007-04-01 17:02 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1.1: Type: text/plain, Size: 1001 bytes --]
Hello Chaps,
I took the Marcel's and started to try and play around with Python this afternoon. I've got the following code, from one of your tutorials i think Marcel.
#!/usr/bin/python
import dbus
bus = dbus.SystemBus();
obj = bus.get_object('org.bluez', '/org/bluez')
manager = dbus.Interface(obj,'org.bluez.Manager')
obj = bus.get_object('org.bluez', manager.DefaultAdapter())
adapter = dbus.Interface(obj, 'org.bluez.Adapter')
print adapter.GetName()
adapter.SetName('My Bluetooth dongle')
I have this file saved as 'test.py' which i then try and execute like 'python test.py' from my shell, but it throws back the error 'ImportError: No module named dbus'. I'm pretty sure this is nothing major, but being new to both python and dbus, i'm a little lost.
Thanks guys,
Rob
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted
[-- Attachment #1.2: Type: text/html, Size: 1660 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Pyhton - ImportError: No module named dbus
@ 2007-04-02 16:02 Robert Rawlins
0 siblings, 0 replies; 5+ messages in thread
From: Robert Rawlins @ 2007-04-02 16:02 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1.1: Type: text/plain, Size: 455 bytes --]
Hey Guys,
I'm still having this exact same issue, so i'm cleaning off my box and start again from scratch. Can someone tell me which programs i need to install to get this stuff running? and in which order i will need to install them?
Thanks,
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
[-- Attachment #1.2: Type: text/html, Size: 637 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Pyhton - ImportError: No module named dbus
@ 2007-04-02 10:09 Robert Rawlins
0 siblings, 0 replies; 5+ messages in thread
From: Robert Rawlins @ 2007-04-02 10:09 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1.1: Type: text/plain, Size: 1253 bytes --]
Another update guys,
I went back to the drawing board and reinstalled everything, Python 2.5, g-libs, pyrex and dbus-python, and all seemed to go fine, but i now get this error message when trying to run my file :-D
/usr/local/lib/python2.5/site-packages/dbus/exceptions.py:8: RuntimeWarning: Python C API version mismatch for module _dbus_bindings: This Python has API version 1013, module _dbus_bindings has version 1012. import _dbus_bindingsTraceback (most recent call last): File "test.py", line 3, in <module> bus = dbus.SystemBus(); File "/usr/local/lib/python2.5/site-packages/dbus/_dbus.py", line 652, in __new__ private=private) File "/usr/local/lib/python2.5/site-packages/dbus/_dbus.py", line 293, in __new__ mainloop=mainloop)dbus.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused
If anyone has the slightest idea as to what is causing this problem i'd love to hear from you, if i had any hair i'd be tearing it out :-D
Thanks,
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
[-- Attachment #1.2: Type: text/html, Size: 1563 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Pyhton - ImportError: No module named dbus
@ 2007-04-02 9:00 Robert Rawlins
0 siblings, 0 replies; 5+ messages in thread
From: Robert Rawlins @ 2007-04-02 9:00 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1.1: Type: text/plain, Size: 1108 bytes --]
Another Update,
I've now installed the latest versions i could find of all the software, including.
DBus 1.0.2
Dbus-Glib 0.72
Dbus-Python 0.80.2
Pyrex 0.9.5
And i'm now getting a different error message.
Introspect error: The name org.bluez was not provided by any .service filesTraceback (most recent call last): File "test.py", line 6, in ? obj = bus.get_object('org.bluez', manager.DefaultAdapter()) File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 25, in __call__ ret = self._proxy_method (*args, **keywords) File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 102, in __call__ reply_message = self._connection.send_with_reply_and_block(message, timeout) File "dbus_bindings.pyx", line 455, in dbus_bindings.Connection.send_with_reply_and_blockdbus_bindings.DBusException: The name org.bluez was not provided by any .service files
Thanks guys,
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
[-- Attachment #1.2: Type: text/html, Size: 1462 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bluez-users] Pyhton - ImportError: No module named dbus
@ 2007-04-02 7:41 Robert Rawlins
0 siblings, 0 replies; 5+ messages in thread
From: Robert Rawlins @ 2007-04-02 7:41 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1.1: Type: text/plain, Size: 690 bytes --]
Hello Guys,
A little bit of an update on this situation. I've installed the dbus-glib package for my slackware build and i've also compiled and installed dbus-python-0.80.2 from source using the usual './configure', 'make' ,'make install' method. I got a few 'warnings' during the installation, but it appears to have run to completion without an error.
I'm still getting this error when i try and run my python file though, is there anything else that i'm missing?
Thanks,
Rob
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
[-- Attachment #1.2: Type: text/html, Size: 924 bytes --]
[-- Attachment #2: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-04-02 16:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-01 17:02 [Bluez-users] Pyhton - ImportError: No module named dbus Robert Rawlins
2007-04-02 7:41 Robert Rawlins
2007-04-02 9:00 Robert Rawlins
2007-04-02 10:09 Robert Rawlins
2007-04-02 16:02 Robert Rawlins
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.