Bug 198632 - system-config-printer-kde broken: "ImportError: No module named kpushbutton"
Summary: system-config-printer-kde broken: "ImportError: No module named kpushbutton"
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Jonathan Riddell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-02 11:47 UTC by Marc Schiffbauer
Modified: 2010-06-26 11:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch (656 bytes, patch)
2009-07-16 19:47 UTC, Rex Dieter
Details
attached (759 bytes, patch)
2009-07-23 12:22 UTC, Maciej Mrozowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer 2009-07-02 11:47:31 UTC
Version:           4.2.95 (using Devel)
OS:                Linux
Installed from:    Compiled sources

The printer configuration is broken in 4.3rc1.

I try to start "kcmshell4 system-config-printer-kde" with following results:

Traceback (most recent call last):                  
  File "<string>", line 18, in kpythonpluginfactory_bridge
  File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 4003, in CreatePlugin
    kcm = u.makeui(component_data, widget_parent)                                                          
  File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 128, in makeui       
    self.ui = PyKcm(component_data, parent, self)
  File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 104, in __init__
    uic.loadUi(APPDIR + "/" + "system-config-printer.ui", self)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/__init__.py", line 112, in loadUi
    return DynamicUILoader().loadUi(uifile, baseinstance)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/Loader/loader.py", line 21, in loadUi
    return self.parse(filename)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 716, in parse
    actor(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 564, in createUserInterface
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 345, in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 365, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 168, in createWidget
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 168, in createWidget
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 345, in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 365, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 345, in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 365, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 542, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 162, in createWidget
    self.stack.push(self.setupObject(widgetClass(elem), parent, elem))
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 134, in setupObject
    obj =  self.factory.createQObject(clsname, name, args, is_attribute)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/objcreator.py", line 57, in createQObject
    classType = self.findQObjectType(classname)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/objcreator.py", line 67, in findQObjectType
    w = module.search(classname)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/Loader/qobjectcreator.py", line 50, in search
    self._modules[module] = __import__(module, {}, {}, (cls,))
ImportError: No module named kpushbutton
Comment 1 Mirek Mieszczak 2009-07-06 22:05:11 UTC
Same here.
gentoo, kde-4.2.95
Comment 2 Jonathan Riddell 2009-07-08 20:41:25 UTC
This is almost certainly a packaging bug, the .ui file is being loaded but it can't find the KDE widgets, which is a plugin (widget-plugins/kde4.py) from PyKDE.

Please talk to your distro packagers about including this file in their python-kde package.
Comment 3 Rex Dieter 2009-07-16 19:08:27 UTC
I'm seeing this too.

Looks like
make install
is missing installing kde4.py into the right places.
Comment 4 Rex Dieter 2009-07-16 19:15:50 UTC
according to kdebindings/python/pykde4/tools/pykdeuic4/README,

"Copy kde4.py to <python-install-dir>/site-packages/PyQt4/uic/widget-plugins/
pykdeuic4 should be installed to somewhere on your path, like /usr/bin/"

And I confirmed this works, but unfortunately, doesn't match what CMakeLists.txt actually does. :(
Comment 5 Rex Dieter 2009-07-16 19:20:14 UTC
re-assigning to kdebindings.

I'll work on a patch to adjust CMakeLists.txt to follow recommended (ie, working) installation procedure.
Comment 6 Rex Dieter 2009-07-16 19:47:24 UTC
Created attachment 35392 [details]
proposed patch
Comment 7 Rex Dieter 2009-07-16 20:56:10 UTC
SVN commit 997974 by rdieter:

Make CMakeLists.txt match install recommendations in README

BUG: 198632


 M  +2 -2      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=997974
Comment 8 Simon Edwards 2009-07-22 20:06:32 UTC
SVN commit 1001230 by sedwards:

Make CMakeLists.txt match install recommendations in README

BUG: 198632



 M  +2 -3      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1001230
Comment 9 Rex Dieter 2009-07-22 20:17:05 UTC
Rats, sorry, I full well intended to backport the fix too (oversight)
Comment 10 Maciej Mrozowski 2009-07-23 12:20:05 UTC
This is probably what you were trying to achieve with pykdeuic4 (instead of creating subdirectory in /usr/bin)

Index: python/pykde4/tools/pykdeuic4/CMakeLists.txt
===================================================================
--- python/pykde4/tools/pykdeuic4/CMakeLists.txt	(revision 1001414)
+++ python/pykde4/tools/pykdeuic4/CMakeLists.txt	(working copy)
@@ -1,2 +1,4 @@
 PYTHON_INSTALL(kde4.py ${PYTHON_SITE_PACKAGES_DIR}/PyQt4/uic/widget-plugins/)
-PYTHON_INSTALL(pykdeuic4.py ${BIN_INSTALL_DIR}/pykdeuic4)
+PYTHON_INSTALL(pykdeuic4.py ${PYTHON_SITE_PACKAGES_DIR}/PyQt4/uic/)
+find_path(cmake_module_dir create_exe_symlink.cmake ${CMAKE_MODULE_PATH})
+INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DTARGET=${PYTHON_SITE_PACKAGES_DIR}/PyQt4/uic/pykdeuic4.py -DLINK_NAME=${BIN_INSTALL_DIR}/pykdeuic4 -P ${cmake_module_dir}/create_exe_symlink.cmake)" )

(This patch is against 4.3 branch)
Comment 11 Maciej Mrozowski 2009-07-23 12:22:00 UTC
Created attachment 35565 [details]
attached
Comment 12 Maciej Mrozowski 2009-07-30 16:30:45 UTC
Please apply above fix - creating subdirectory in /usr/bin/ is not the way to go.
Comment 13 Rex Dieter 2009-07-30 16:48:03 UTC
Meh, righto, of course.

I'll take care of fixing the mess.
Comment 14 Rex Dieter 2009-07-30 17:20:14 UTC
SVN commit 1004600 by rdieter:

better (and working!) pykdeuic4 cmake fix

BUG: 198632


 M  +3 -1      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1004600
Comment 15 Rex Dieter 2009-07-30 17:23:31 UTC
SVN commit 1004602 by rdieter:

backport: better (and working!) pykdeuic4 cmake fix

BUG: 198632


 M  +3 -1      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1004602
Comment 16 Rex Dieter 2009-07-30 17:41:11 UTC
One small thing, Riddell mentioned on irc that it may make more sense to put pykdeuic4 in
${PYTHON_SITE_PACKAGES_DIR}/PyKDE4/uic/
instead of
${PYTHON_SITE_PACKAGES_DIR}/PyQt4/uic/

and I think I would agree.  Simon?  Any comment/preference?
Comment 17 Marc Schiffbauer 2009-12-27 21:56:25 UTC
After six months, and first seen in 4.2.95 this is still broken in 4.3.85.

Are there any news to this?

Or should this bug be closed as WONTFIX ?
Comment 18 Marc Schiffbauer 2010-06-26 11:47:12 UTC
There is some sort of "working" kcm for printers now (not functional but the bug described here seems to be gone.