Bug 204342 - AbstractRunner wrong lookup for ScriptEngine
Summary: AbstractRunner wrong lookup for ScriptEngine
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-18 23:44 UTC by Fran Ruiz
Modified: 2010-01-10 02:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fran Ruiz 2009-08-18 23:44:44 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Ubuntu Packages

I've been developing a Plasma Runner with Python. Once I have installed it and  krunner is restarted the debug info show:

...
krunner(27828)/libplasma Plasma::engineOffers: No offers for " "python" "
krunner(27828)/libplasma Plasma::engineOffers: No offers for " "python" "
krunner(27828)/libplasma Plasma::AbstractRunnerPrivate::AbstractRunnerPrivate: Could not create a(n) "python" ScriptEngine for the "MyRunner" Runner.
...

I've been trying to follow the calls backtrace and I've arrived at "abstractrunner.cpp:69" and noticed that it's looking up for a ScriptEngine with api=" "python" " (as shown in the error message), instead of api="python".


I've gotten the expected behaviour in Python, which means (I think) that the full machinery is ready.

from PyKDE4.kdecore import KServiceTypeTrader
KServiceTypeTrader.self().query("Plasma/ScriptEngine", "[X-Plasma-API] == 'python'")

The value for api is taken from the metadata file and it is:
X-Plasma-API=python
(I've tried many other values and yes, it's taken from here)

Any ideas?
Comment 1 Fran Ruiz 2009-08-19 14:26:04 UTC
I don't completely agree with the Product change (from plasma to krunner) because runners are a part of Plasma and KRunner uses them.
Comment 2 Beat Wolf 2009-08-19 22:07:12 UTC
that is true, but you will probably have more chances that the people that are really concerned about the runners see it. But if you really disagrea i can change it back, it's sometimes hard to pick the right product for a bug
Comment 3 Fran Ruiz 2009-08-20 13:17:31 UTC
Good point! :)
Comment 4 Jacopo De Simoi 2010-01-09 12:56:16 UTC
is this still the case on recent kde versions?
thanks
Comment 5 Fran Ruiz 2010-01-09 14:18:42 UTC
Yes, checked on kde 4.3.4

(In reply to comment #4)
> is this still the case on recent kde versions?
> thanks
Comment 6 Fran Ruiz 2010-01-10 01:50:32 UTC
I've been taking a look and I've found that in version 4.3.80 the "pyrunner.py" (which I suppose that will fix my problem) file has been included, hasn't it?

(In reply to comment #4)
> is this still the case on recent kde versions?
> thanks
Comment 7 Fran Ruiz 2010-01-10 02:05:29 UTC
It works!!! I've checked out the trunk version of the python scriptengine and it works!!! :DD

Thank you for the hint!!

(In reply to comment #4)
> is this still the case on recent kde versions?
> thanks