Bug 194373 - KCModule doesn't work in systemsettings
Summary: KCModule doesn't work in systemsettings
Status: RESOLVED NOT A BUG
Alias: None
Product: system-config-printer-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Unspecified
: NOR normal
Target Milestone: ---
Assignee: Jonathan Riddell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 04:29 UTC by Ben Boeckel
Modified: 2009-07-16 19:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Boeckel 2009-05-28 04:29:31 UTC
Version:            (using KDE 4.2.85)
Installed from:    Fedora RPMs

When trying to use the printer configuration in systemsettings, it gives a message that it doesn't know how to handle modules with the keyword 'system-config-printer-kde/system-config-printer-kde.py'.

% rpm -q system-config-printer-kde kdebase
system-config-printer-kde-4.2.85-2.fc11.x86_64
kdebase-4.2.85-1.fc11.x86_64
Comment 1 Martin Kho 2009-07-02 13:10:15 UTC
The same happens with Rawhide RPM's (KDE 4.2.95) 
system-config-printer-kde-4.2.95-1.fc12.x86_64.

$kcmshell4 system-config-printer-kde gives:

Traceback (most recent call last):
  File "/usr/share/kde4/apps/system-config-printer-kde/system-config-printer-kde.py", line 32, in <module>
    import locale
  File "/usr/lib64/python2.6/locale.py", line 183, in <module>
    import re, operator
ImportError: /usr/lib64/python2.6/lib-dynload/operator.so: undefined symbol: _Py_ZeroStruct

See also:
https://bugs.launchpad.net/ubuntu/+source/kdeadmin-kde4/+bug/331192, the
post from Greg Johnson.

Maybe this is related, can give a clue?

Martin Kho
Comment 2 Jonathan Riddell 2009-07-08 20:51:03 UTC
This looks like a problem with Python on your system.  Try running python from the command line and `import operator`.  Do you have more than one version of python installed?  Symbols may be getting confused.  Unless you have python compiled yourself best talk to your distro.
Comment 3 Ben Boeckel 2009-07-09 02:47:15 UTC
I have stock Python 4.6 (Fedora) and "import operator" works. Only one python installed.
Comment 4 Martin Kho 2009-07-12 22:15:41 UTC
Hi,

After installing python-devel - suggested at launchpad.net in bug report #331192 [1] - I get the same output as in [2]. Jonathan says there: "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."

So this bug seems a duplicate of [2]? And the 'problem' is in PyKDE, right?

@Ben: something for fedora-kde?

[1] https://bugs.launchpad.net/ubuntu/+source/kdeadmin-kde4/+bug/331192
[2] https://bugs.kde.org/show_bug.cgi?id=198632
Comment 5 Ben Boeckel 2009-07-13 04:18:18 UTC
PyKDE4-devel did not help this issue. I'll look into file lists for where kde4.py comes from, I see nothing in here so far for "widget-plugins/kde4.py".
Comment 6 Martin Kho 2009-07-13 09:15:32 UTC
kde4.py is in PyKDE4: /usr/share/kde4/apps/pykde4/kde4.py
Comment 7 Jonathan Riddell 2009-07-16 18:06:04 UTC
For Ben Boeckel, what's the output on the command line from 

kcmshell4 system-config-printer-kde
Comment 8 Rex Dieter 2009-07-16 18:40:23 UTC
This is what I'm seeing:

$ kcmshell4 system-config-printer-kde  
Traceback (most recent call last):     
  File "<string>", line 18, in kpythonpluginfactory_bridge
  File "/usr/share/kde4/apps/system-config-printer-kde/system-config-printer-kde.py", line 4002, in CreatePlugin                                                                                                              
    kcm = u.makeui(component_data, widget_parent)                                                              
  File "/usr/share/kde4/apps/system-config-printer-kde/system-config-printer-kde.py", line 127, in makeui      
    self.ui = PyKcm(component_data, parent, self)                                                              
  File "/usr/share/kde4/apps/system-config-printer-kde/system-config-printer-kde.py", line 103, 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 768, in parse                          
    actor(elem)                                                                                                
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 616, in createUserInterface            
    self.traverseWidgetTree(elem)                                                                              
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 594, in traverseWidgetTree             
    handler(self, child)                                                                                       
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 383, in createLayout                   
    self.traverseWidgetTree(elem)                                                                              
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 594, in traverseWidgetTree             
    handler(self, child)                                                                                       
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 417, in handleItem                     
    self.traverseWidgetTree(elem)                                                                              
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 594, 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 594, 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 594, in traverseWidgetTree             
    handler(self, child)                                                                                       
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 383, in createLayout                   
    self.traverseWidgetTree(elem)                                                                              
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 594, in traverseWidgetTree             
    handler(self, child)                                                                                       
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 417, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 594, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 383, in createLayout
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 594, in traverseWidgetTree
    handler(self, child)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 417, in handleItem
    self.traverseWidgetTree(elem)
  File "/usr/lib64/python2.6/site-packages/PyQt4/uic/uiparser.py", line 594, 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 9 Rex Dieter 2009-07-16 19:02:12 UTC
looks like my traceback pretty much matches bug #198632

(Martin's problem is likely a rawhide-ism)