This forum has been archived. All content is frozen. Please use KDE Discuss instead.

problems with running the Python plasmoid tutorial

Tags: None
(comma "," separated)
CGenie
Registered Member
Posts
6
Karma
0
OS
Hello,
I'm trying to run the hello-python tutorial from http://techbase.kde.org/Development/Tutorials/Plasma/Python/GettingStarted.
I've created all the files and dir structure, and packaged it with zip. I did run
Code: Select all
plasmapkg -i hello-python.zip

and it seems that it installed properlly.
But now when I run
Code: Select all
plasmoidviewer hello-python

I get a window with only grey box inside it. Also, when I add this plasmoid to the desktop, I get
This object could not be created for the following reason:
Could not find the requested component hello-python

I've heard some people who tried to run the C++ version also got this error.
Does anyone know what I have wrong here?
Regards,
Przemek
User avatar
frederik
Moderator
Posts
37
Karma
0
OS
What is the shell output of the plasmoidviewer hello-python command?
Try running kbuildsycoca4 and make sure you have python bindings installed (this depends on your distribution, I heard before that sometimes python-devel is needed, at least the python-kde4 packages are probably needed).
CGenie
Registered Member
Posts
6
Karma
0
OS
I'm using Kdemod packages for Arch Linux. I do have python bindings installed.
The output of plasmoidviewer:
plasmoidviewer(18939)/libplasma Plasma::CoronaPrivate::addContainment: loading of containment "null" failed.
plasmoidviewer(18939) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: not found"
plasmoidviewer(18939)/libplasma Plasma::AppletPrivate::init: Check your constructor! You probably want to be passing in a Service::Ptr or a QVariantList with a valid storageid as arg[0].
User avatar
frederik
Moderator
Posts
37
Karma
0
OS
If you still haven't found a solution, email plasma-devel@kde.org or ask in the #plasma irc channel on freenode.
CGenie
Registered Member
Posts
6
Karma
0
OS
OK, so I've tweaked a bit with the code and made it work.
I've changed the drawText line to this:
Code: Select all
painter.drawText(rect, Qt.AlignVCenter, "Hello Python!")

and it works. But if I put Qt.AlignHCenter instead of VCenter, I get the same error... Dunno what's wrong here... It works with
Code: Select all
Qt.AlignRight | Qt.AlignHCenter

for example.
CGenie
Registered Member
Posts
6
Karma
0
OS
Well, miraculously, I've reinstalled, ran, and removed this plasmoid 3 times and now it works...
User avatar
SeaJey
Registered Member
Posts
166
Karma
0
OS
removed this plasmoid 3 times and now it works...

God loves trinity :)


kubuntu 10.04 AMD64 - KDE 4.4
AMD - radeonHD - M-Audio revolution 5.1


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]