Bug 226351 - Plasmate appends .js to Python mainscripts
Summary: Plasmate appends .js to Python mainscripts
Alias: None
Product: Plasma SDK
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Platform: openSUSE RPMs Unspecified
: NOR normal (vote)
Target Milestone: ---
Assignee: Plasma Bugs List
Depends on:
Reported: 2010-02-11 18:23 UTC by Luca Beltrame
Modified: 2010-02-11 23:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2010-02-11 18:23:38 UTC
Version:           0.1 alpha 1 (using KDE 4.4.0)
Installed from:    openSUSE RPMs

When creating a project for a Python applet (using the exact same code as the second Techbase tutorial), creating the main script file and then using the preview only results in a "Script initialization failed" error.

On console, this is the output that is significant:

plasmate(30683)/libplasma Plasma::AppletPrivate::mainConfigGroup: copying default config:  "/home/lb/.kde4/share/apps/plasmate/entrezsearcher/contents/config/default-configrc"
plasmate(30683)/libplasma Plasma::AppletPrivate::setupScriptSupport: setting up script support, package is in "/home/lb/.kde4/share/apps/plasmate/entrezsearcher/" which is a "Plasmoid" package , main script is "/home/lb/.kde4/share/apps/plasmate/entrezsearcher/contents/code/entrezsearcher.py.js"
Traceback (most recent call last):
  File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 59, in init
    self.module = __import__(self.pluginName+'.'+relpath)
ImportError: No module named entrezsearcher.py.js

So that means that the .js suffix is being wrongly added here, and in the metadata.desktop file. Notice that the applet won't run even if this is fixed, but I'll investigate first (and report a separate bug if the case).
Comment 1 Aaron J. Seigo 2010-02-11 23:16:14 UTC
SVN commit 1088914 by aseigo:

* missing 'else'
* use KDesktopFile, not QFile, to write a desktop file

 M  +10 -15    startpage.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=1088914