Installing python-plasma does not ensure Python Plasmoids work

Bug #318815 reported by David Taylor
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kdebase-workspace (Ubuntu)
Invalid
Undecided
David Taylor

Bug Description

I have installed the Python-Plasma and the Python-Plasma-Examples packages but they do not work as I assume they are missing dependencies.

When I run the plasmoid it reports: The object could not be created for the following reason: "Could not create a python ScriptEngine for the Python Clock Widget."

If I follow the tutorial at the link: http://techbase.kde.org/Development/Tutorials/Plasma/Python/GettingStarted

and finally run the command: plasmoidviewer hello-python

I get the same message in the Plasmoid

and in the CLI I get the message:

"
plasmoidviewer(8072) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: not found"
plasmoidviewer(8072): couldn't create slave: "Unable to create io-slave:
klauncher said: Unknown protocol ''.
"
Traceback (most recent call last):
  File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 19, in <module>
    from PyQt4.QtCore import *
ImportError: /usr/lib/python2.5/site-packages/PyQt4/QtCore.so: undefined symbol: PyExc_ValueError
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 38, in apport_excepthook
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in <module>
    from apport.report import Report
  File "/usr/lib/python2.5/site-packages/apport/report.py", line 14, in <module>
    import subprocess, tempfile, os.path, urllib, re, pwd, grp, os, sys
  File "/usr/lib/python2.5/subprocess.py", line 401, in <module>
    import select
ImportError: /usr/lib/python2.5/lib-dynload/select.so: undefined symbol: PyExc_ValueError

Original exception was:
Traceback (most recent call last):
  File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 19, in <module>
    from PyQt4.QtCore import *
ImportError: /usr/lib/python2.5/site-packages/PyQt4/QtCore.so: undefined symbol: PyExc_ValueError
"

I am assuming there is a missing package however I do not know what and would like to suggest what that would be. I have a desktop that has been upgraded to KDE4.2 RC1 if that is anyway relevant to the problem.

Revision history for this message
Terence Simpson (tsimpson) wrote :

I can't reproduce the error you are getting
From a clean Intrepid chroot I installed python-plasma, python-plasma-examples and kdebase-workspace-bin.
Using the instructions from the teckbase link I got this output from plasmoidviewer http://paste.ubuntu.com/107062/
After editing the script to: http://paste.ubuntu.com/107071/ I get this output: http://paste.ubuntu.com/107068/

Revision history for this message
David Taylor (me-davidandrewtaylor) wrote :

I notice there are errors on both the outputs you pasted, does this mean you got a working plasmoid in the end?

I tried the scripts that you produced to no avail - same output as before.

If you say you can get it to work I shall make a new build image in a virtual machine and give it a whirl. I haven't made any substantial modifications to both the macines I have tried this on so I am uncertain how come you get a cleaner albeit errored output than I. I hope I can get this sorted soon so I can start my little project.

Revision history for this message
Terence Simpson (tsimpson) wrote :

Yes, after I edited the script the plasmoid works. The only error in the 2nd output I see is "findServiceByDesktopPath: not found", which seems to happen with any plasmoid started with plasmoidviewer, the rest seems to be debugging output.

Revision history for this message
David Taylor (me-davidandrewtaylor) wrote :

You are right it does work from a fresh install, I must have installed something that's disagreeable to Python widgets at some point. I'll close this off - my error.

Revision history for this message
David Taylor (me-davidandrewtaylor) wrote :

If I take ownership I can hopefully close it as I can't as the status option doesn't have a closed option.

Changed in kdebase-workspace:
assignee: nobody → me-davidandrewtaylor
Revision history for this message
David Taylor (me-davidandrewtaylor) wrote :

I will close this - can anyone tell me how I would do that?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Click on any of the arrows (like the one next to the status) and set the Status to Invalid from the combobox.
Thanks for the bug report.

Changed in kdebase-workspace:
status: New → Invalid
Revision history for this message
ThyMythos (thymythos) wrote :

What are the exact versions of the packages you have installed? I get the same error with Intrepid + KDE4.2.

Revision history for this message
David Taylor (me-davidandrewtaylor) wrote :

I also had the problem when running the KDE 4.2 version but had made so many changes to that installation I couldn't rightly say which change was causing the problem but I now can take a stab in an educated dark and say it is with the KDE 4.2 packages. I was intending to do some coding in Python creating a few Plasmoid widgets and have got my project working but seeing as KDE 4.2 and Python do not play and that the majority of users will be on 4.2 I may hold off on release.

Due to a number of issues with Kubuntu I have decided to try OpenSuse which I am downloading right now but you are more than welcome to re-open this fault stating that the fault is with KDE 4.2 if you like however my participation is likely to be limited unless OpenSuse and its package management is as poor as it was when I last tried it.

Revision history for this message
Tomáš Myšík (gapon) wrote :

'aptitude install python-dev' solved this problem for me. HTH

Revision history for this message
David Taylor (me-davidandrewtaylor) wrote :

I like how this bug has been marked as a duplicate of a bug that was logged later! Surely that should be the opposite way around?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Not if the other one is already marked as fixed. ;-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.