'bzr help commands' crashes when qt not correctly installed (seen on mac os x)

Bug #515636 reported by sammy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Invalid
Undecided
Unassigned
Bazaar Mac Installers
Invalid
Medium
Gordon Tyler
QBzr
Fix Released
High
Alexander Belchenko

Bug Description

MACDE****:/ j****$ bzr help commands
bzr: ERROR: exceptions.ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtCore.so, 2): Library not loaded: QtCore.framework/Versions/4/QtCore
  Referenced from: /Library/Python/2.6/site-packages/PyQt4/QtCore.so
  Reason: image not found

Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 1070, in ignore_pipe
    result = func(*args, **kwargs)
  File "/Library/Python/2.6/site-packages/bzrlib/builtins.py", line 4192, in run
    bzrlib.help.help(topic)
  File "/Library/Python/2.6/site-packages/bzrlib/help.py", line 52, in help
    outfile.write(source.get_help_text(shadowed_terms))
  File "/Library/Python/2.6/site-packages/bzrlib/help_topics/__init__.py", line 849, in get_help_text
    result = topic_registry.get_detail(self.topic)
  File "/Library/Python/2.6/site-packages/bzrlib/help_topics/__init__.py", line 90, in get_detail
    return obj(topic)
  File "/Library/Python/2.6/site-packages/bzrlib/help.py", line 78, in _help_commands_to_text
    shown_commands = [(n, o) for n, o in commands if o.hidden == hidden]
  File "/Library/Python/2.6/site-packages/bzrlib/help.py", line 77, in <genexpr>
    commands = ((n, _mod_commands.get_cmd_object(n)) for n in names)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 213, in get_cmd_object
    return _get_cmd_object(cmd_name, plugins_override)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 233, in _get_cmd_object
    cmd = hook(cmd, cmd_name)
  File "/Library/Python/2.6/site-packages/bzrlib/commands.py", line 306, in _get_plugin_command
    return plugin_cmds.get(cmd_name)()
  File "/Library/Python/2.6/site-packages/bzrlib/registry.py", line 173, in get
    return self._dict[self._get_key_or_default(key)].get_obj()
  File "/Library/Python/2.6/site-packages/bzrlib/registry.py", line 61, in get_obj
    self._do_import()
  File "/Library/Python/2.6/site-packages/bzrlib/registry.py", line 70, in _do_import
    obj = __import__(self._module_name, globals(), locals(), names)
  File "/Library/Python/2.6/site-packages/bzrlib/plugins/qbzr/lib/subprocess.py", line 30, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: dlopen(/Library/Python/2.6/site-packages/PyQt4/QtCore.so, 2): Library not loaded: QtCore.framework/Versions/4/QtCore
  Referenced from: /Library/Python/2.6/site-packages/PyQt4/QtCore.so
  Reason: image not found

bzr 2.1.0rc1 on python 2.6.1 (Darwin-10.2.0-i386-64bit)
arguments: ['/usr/local/bin/bzr', 'help', 'commands']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'fr_CH.UTF-8'
plugins:
  bzrtools /Library/Python/2.6/site-packages/bzrlib/plugins/bzrtools [2.1.0b1]
  email /Library/Python/2.6/site-packages/bzrlib/plugins/email [unknown]
  explorer /Library/Python/2.6/site-packages/bzrlib/plugins/explorer [0.11.2]
  keychain /Library/Python/2.6/site-packages/bzrlib/plugins/keychain [0.1.0]
  launchpad /Library/Python/2.6/site-packages/bzrlib/plugins/launchpad [2.1.0rc1]
  netrc_credential_store /Library/Python/2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.1.0rc1]
  news_merge /Library/Python/2.6/site-packages/bzrlib/plugins/news_merge [2.1.0rc1]
  qbzr /Library/Python/2.6/site-packages/bzrlib/plugins/qbzr [0.18.0]
  rebase /Library/Python/2.6/site-packages/bzrlib/plugins/rebase [0.5.5]
  svn /Library/Python/2.6/site-packages/bzrlib/plugins/svn [1.0.1]
  upload /Library/Python/2.6/site-packages/bzrlib/plugins/upload [1.0.0dev]
  xmloutput /Library/Python/2.6/site-packages/bzrlib/plugins/xmloutput [0.8.5]

Related branches

Revision history for this message
Gordon Tyler (doxxx) wrote :

Did you install the Qt framework as described in http://wiki.bazaar.canonical.com/MacOSXDownloads?

Revision history for this message
sammy (scoulin) wrote :

I didn't... It is working now after I installed QT 4.6.1

However, it's weird to have to install QT just to show the available commands in the console. At first I thought QT was just a requirement if using Bazaar with some graphics and not only the console.

Thanks

Revision history for this message
Gordon Tyler (doxxx) wrote :

Yeah, it's an artifact of the way the plugins work. The installer should also check whether Qt is installed, or even install the relevant bits of Qt for you.

Changed in bzr-mac-installers:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Gordon Tyler (doxxx)
milestone: none → 2.1.0rc2
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 515636] Re: bazaar crashes on mac os x displaying help commands

On Mon, 2010-02-01 at 21:36 +0000, Gordon Tyler wrote:
> Yeah, it's an artifact of the way the plugins work. The installer should
> also check whether Qt is installed, or even install the relevant bits of
> Qt for you.

Actually its a bit of a bug in explorer/qbzr - its totally possible to
change them to permit help to be shown without needing Qt.

-Rob

affects: bzr → qbzr
Changed in qbzr:
importance: Undecided → Medium
status: New → Confirmed
summary: - bazaar crashes on mac os x displaying help commands
+ 'bzr help commands' crashes when qt not correctly installed (seen on mac
+ os x)
Revision history for this message
Alexander Belchenko (bialix) wrote :

Gary van der Merwe пишет:
> ** Project changed: bzr => qbzr
>
> ** Changed in: qbzr
> Importance: Undecided => Medium
>
> ** Changed in: qbzr
> Status: New => Confirmed
>
> ** Also affects: bzr-explorer
> Importance: Undecided
> Status: New
>
> ** Summary changed:
>
> - bazaar crashes on mac os x displaying help commands
> + 'bzr help commands' crashes when qt not correctly installed (seen on mac os x)

It could be my fault: I've moced cmd_qsubprocess from commands.py to
subprocess.py. I think we have to revert this change.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Looking at the stack trace, I don't think Explorer is involved here? Does the problem go away if QBzr is removed?

Changed in bzr-explorer:
status: New → Incomplete
Changed in bzr-explorer:
status: Incomplete → Invalid
Changed in qbzr:
importance: Medium → Critical
importance: Critical → High
Changed in bzr-mac-installers:
status: Confirmed → Invalid
Changed in qbzr:
assignee: nobody → Alexander Belchenko (bialix)
milestone: none → 0.18.1
Revision history for this message
Alexander Belchenko (bialix) wrote :

This is fixed in lp:qbzr/0.18 branch. sammy, can you test it?

Changed in qbzr:
status: Confirmed → Fix Released
Gordon Tyler (doxxx)
Changed in bzr-mac-installers:
milestone: 2.1.0rc2 → none
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.