FS#18446 - [kdeadmin-system-config-printer-kde] KCModule error

Attached to Project: Arch Linux
Opened by Erwin Van de Velde (evdvelde) - Wednesday, 24 February 2010, 09:56 GMT
Last edited by Andrea Scarpino (BaSh) - Thursday, 04 March 2010, 23:07 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
When I go to System Settings and click on Printer Configuration, I get following error:
"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."


Additional info:
* package version(s)
kdeadmin-system-config-printer-kde 4.4.0-1
kdelibs 4.4.0-4


Steps to reproduce:
Just open system-settings in KDE and click on Printer Configuration
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Thursday, 04 March 2010, 23:07 GMT
Reason for closing:  Fixed
Additional comments about closing:  kdeadmin-system-config-printer-kde 4.4.1-2
Comment by A.F.G. (TuxLin) - Wednesday, 24 February 2010, 10:27 GMT
I can Confirm this too:

---------------------------------------------------
Traceback:

kpythonpluginfactory" using symbol "kpythonpluginfactory"
systemsettings(3116)/python (plugin) KPythonPluginFactory::KPythonPluginFactory: KPythonPluginFactory::KPythonPluginFactory()
systemsettings(3116)/python (plugin) KPythonPluginFactory::initialize: Initializing Python interpreter.
systemsettings(3116)/python (plugin) KPythonPluginFactory::initialize: Succesfully initialized Python interpreter.
systemsettings(3116)/python (plugin) KPythonPluginFactory::create: KPythonPluginFactory::create iface: KCModule
systemsettings(3116)/python (plugin) KPythonPluginFactory::create: keyword to be used for finding the plugin code: "system-config-printer-kde/system-config-printer-kde.py"
systemsettings(3116)/python (plugin) KPythonPluginFactory::create: Path to plugin code is: "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py"
Traceback (most recent call last):
File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 424, in on_tvMainList_cursor_changed
self.fillPrinterTab(name)
File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 1147, in fillPrinterTab
option.reinit (value, supported=supported)
File "/usr/share/apps/system-config-printer-kde/options.py", line 136, in reinit
self.widget.addItem(self.combobox_dict[each])
AttributeError: OptionAlwaysShown instance has no attribute 'combobox_dict'
systemsettings(3116)/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 360, in makeui
self.populateList(start_printer, change_ppd)
File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 636, in populateList
self.on_tvMainList_cursor_changed()
File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 424, in on_tvMainList_cursor_changed
self.fillPrinterTab(name)
File "/usr/share/apps/system-config-printer-kde/system-config-printer-kde.py", line 1147, in fillPrinterTab
option.reinit (value, supported=supported)
File "/usr/share/apps/system-config-printer-kde/options.py", line 136, in reinit
self.widget.addItem(self.combobox_dict[each])
AttributeError: OptionAlwaysShown instance has no attribute 'combobox_dict'
systemsettings(3116)/python (plugin) KPythonPluginFactory::create: KPythonPluginFactory::create iface: KCModule
systemsettings(3116)/python (plugin) KPythonPluginFactory::create: keyword to be used for finding the plugin code: ""
systemsettings(3116)/python (plugin) KPythonPluginFactory::create: Path to plugin code is: "/home/usuario/.kde4/share/apps/"
systemsettings(3116)/python (plugin): Failed to import module
systemsettings(3116)/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(3116)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
systemsettings(3116)/python (plugin) KPythonPluginFactory::~KPythonPluginFactory: KPythonPluginFactory::~KPythonPluginFactory()
-------------------------------------------------
Architecture x86_64
Packagekdeadmin-system-config-printer-kde-4.4.0-1

Comment by Andrea Scarpino (BaSh) - Wednesday, 24 February 2010, 11:57 GMT
  • Field changed: Summary (Printer Configuration in KDE fails → [kdeadmin-system-config-printer-kde] KCModule error)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Severity (Medium → Low)
  • Task assigned to Andrea Scarpino (BaSh)
works for me...please report this upstream
Comment by Sergio Tridente (TioDuke) - Thursday, 25 February 2010, 12:03 GMT
I have had the same problem. I am attaching a patch that solves it.
Comment by Andrea Scarpino (BaSh) - Thursday, 25 February 2010, 12:23 GMT
@Augusto
where did you take that patch? It does the fix, but should it edit line 145 too?
Comment by Sergio Tridente (TioDuke) - Thursday, 25 February 2010, 15:05 GMT
The patch is mine.

Regarding line 145: I don't think so. See, in the __init__ method "combobox_dict" is defined only when "ipp_type == int": the same condition as of line 140. But that class member is not declared when dealing with "ipp_type == str" (line 132) which is why "self.widget.addItem(self.combobox_dict[each])" yields problems.

Now if I understand it correctly, what "self.combobox_dict[each]" does is a conversion from an int to a str, which is why it is necessary when dealing with "ipp_type == int" and unnecessary (and incorrect) when "ipp_type == str".

In any case, this simple patch seems to solve the problem. If it is OK for you, will you propose it upstream or you prefer me to do so? (I always thought it is better for us users to deal directly with our distro devs and let you work with upstream.)
Comment by A.F.G. (TuxLin) - Thursday, 25 February 2010, 22:55 GMT
The Augusto's patch work well for me.

I think this patch solve the problem.

Comment by Andrea Scarpino (BaSh) - Wednesday, 03 March 2010, 01:18 GMT
  • Field changed: Status (Assigned → Waiting on Response)
this works without the patch in kde 4.4.1?
Comment by biginoz (biginoz) - Wednesday, 03 March 2010, 18:45 GMT
No It dosen't work without the patch and with kde 4.4.1
Comment by Andrea Scarpino (BaSh) - Thursday, 04 March 2010, 12:57 GMT
  • Field changed: Status (Waiting on Response → Assigned)
  • Field changed: Architecture (x86_64 → All)
I do not know python, I'll report to KDE devs your patch.
Comment by biginoz (biginoz) - Thursday, 04 March 2010, 17:22 GMT
If my printer turn off, the bug disappear. But if the printer turn on, the bug is still here.
My printer is plugged with other pc (with ubuntu). I print trought local network .

Sorry for bad english.
Comment by Andrea Scarpino (BaSh) - Thursday, 04 March 2010, 23:07 GMT
@Augusto
your patch was commited upstream. Good job.

Loading...