Bug 244942 - Printer Configuration module does no more load with PyQt 4.7.4
Summary: Printer Configuration module does no more load with PyQt 4.7.4
Status: RESOLVED FIXED
Alias: None
Product: system-config-printer-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Jonathan Riddell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-17 11:45 UTC by Andrea Scarpino
Modified: 2010-07-29 13:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: trunk


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Scarpino 2010-07-17 11:45:56 UTC
After the update to pyqt 4.7.4 the printer configuration module in system settings does no more work.

Error is:
"The service 'Printer Configuration' does not provide an interface 'KCModule' with keyword 'system-config-printer-kde/system-config-printer-kde.py' The factory does not support creating components of the specified type."

Output in konsole:
(6298)/python (plugin): Error while running factory function for Python plugin:  "system-config-printer-kde/system-config-printer-kde.py" 
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 4004, 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/lib/python2.6/site-packages/PyQt4/uic/__init__.py", line 177, in loadUi
    return DynamicUILoader().loadUi(uifile, baseinstance)
  File "/usr/lib/python2.6/site-packages/PyQt4/uic/Loader/loader.py", line 24, in loadUi
    return self.parse(filename, os.path.dirname(filename))
  File "/usr/lib/python2.6/posixpath.py", line 119, in dirname
    i = p.rfind('/') + 1
AttributeError: 'QString' object has no attribute 'rfind'
systemsettings(6298)/python (plugin): Failed to import module 
systemsettings(6298)/kcontrol KCModuleLoader::loadModule: This module has no valid entry symbol at all. The reason could be that it's still using K_EXPORT_COMPONENT_FACTORY with a custom X-KDE-FactoryName which is not supported anymore 
systemsettings(6298)/python (plugin): Error while running factory function for Python plugin:  "system-config-printer-kde/system-config-printer-kde.py" 
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 4004, 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/lib/python2.6/site-packages/PyQt4/uic/__init__.py", line 177, in loadUi
    return DynamicUILoader().loadUi(uifile, baseinstance)
  File "/usr/lib/python2.6/site-packages/PyQt4/uic/Loader/loader.py", line 24, in loadUi
    return self.parse(filename, os.path.dirname(filename))
  File "/usr/lib/python2.6/posixpath.py", line 119, in dirname
    i = p.rfind('/') + 1
AttributeError: 'QString' object has no attribute 'rfind'
systemsettings(6298)/python (plugin): Failed to import module 
systemsettings(6298)/kcontrol KCModuleLoader::loadModule: This module has no valid entry symbol at all. The reason could be that it's still using K_EXPORT_COMPONENT_FACTORY with a custom X-KDE-FactoryName which is not supported anymore

kdebindings (both 4.4.5 and 4.4.92) have been rebuilt with sip 4.10.4 and pyqt 4.7.4.
Comment 1 Christian (Fuchs) 2010-07-22 14:06:37 UTC
Confirmed here (gentoo, same versions), a workaround is to 

        return self.parse(filename, os.path.dirname(str(filename)))
#       return self.parse(filename, os.path.dirname(filename))


in <libdir>/python2.6/site-packages/PyQt4/uic/Loader/loader.py

Kind regards, 

Christian
Comment 2 Andrea Scarpino 2010-07-29 12:20:51 UTC
this fixed it: http://websvn.kde.org/?view=revision&revision=1156006
Comment 3 Jonathan Riddell 2010-07-29 13:18:37 UTC
*** Bug 245289 has been marked as a duplicate of this bug. ***