Bzr and DBus

John Arbash Meinel john at arbash-meinel.com
Fri May 9 15:23:41 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Russel Winder wrote:
| On Wed, 2008-05-07 at 09:37 +0800, James Henstridge wrote:
|
|> So the fact that Russel's traceback was saying that it couldn't find
|> "dbus.service" rather than "service" seems to indicate that it
|> couldn't even import the top level "dbus" module.
|
| It gets weirder.  Graham Roberts spotted that he was getting this error
| message  on his Mac OS X machine (I mainly use Ubuntu).  So I gave it a
| go and also get the message:
|
| |> bzr push
| Using saved location: bzr
| +ssh://dimen.russel.org.uk/home/www/www.russel.org.uk/html/Bazaar/SCons_Core/
| Unable to load plugin 'dbus' from
| '/usr/lib/python2.5/site-packages/bzrlib/plugins'
| No new revisions to push.
| |>
|
| Why is this totally weird?  Well /usr/lib/python2.5 doesn't exist on the
| Macports port, which is what Graham and I are using.  On my Mac OS X
| machine I appear to have a number versions of Python -- I am guessing
| that the ones in macports are actually symbolic links not copies..
|
| /Library/Frameworks/Python.framework/Versions/2.4
| /Library/Frameworks/Python.framework/Versions/2.5
| /System/Library/Frameworks/Python.framework/Versions/2.3
| /opt/local/Library/Frameworks/Python.framework/Versions/2.4
| /opt/local/lib/python2.4
| /opt/local/lib/python2.5
| /opt/local/var/macports/software/bzr/1.3.1_0/opt/local/lib/python2.5
| /opt/local/var/macports/software/bzr/1.3_0/opt/local/lib/python2.5
| /opt/local/var/macports/software/bzr/1.4_0/opt/local/lib/python2.5
|
| The point is that /usr/lib/python2.5 doesn't appear anywhere.  So the
| path is hardwired in the code somewhere rather than being generated by
| the path of the Python in use.
|
| I am beginning to wonder if the message itself is totally spurious?  It
| is still a bug, it shouldn't appear at all but maybe it is reporting the
| wrong thing?
|

If the .pyc file already exists and is being re-used, it contains the path. You
might want to go into whatever directory and:

~  find . -name '*.pyc' -print0 | sudo xargs -0 rm

And then

~  sudo python -c "import compileall; compileall.compile_dir('.')"

That should rebuild all of the .pyc files with the correct paths.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgkXm0ACgkQJdeBCYSNAANcJwCffzvlcoCjesjxKZxQrNnX+6SK
Q3QAnjISU4SEVtP0SxRxPMBwamIOmFFV
=kL3s
-----END PGP SIGNATURE-----



More information about the bazaar mailing list