Python2 plasmoids loading error

Loïc Grobol loic.grobol at gmail.com
Wed Feb 13 21:07:08 UTC 2013


Hi, all
I don't really know if I should report this to Kubuntu or to KDE, so I
try here, please tell me if it should go upstream.
Since the Raring upgrade (and  KDE 4.10 upgrade since I did these the
same day), the Veromix Plasmoid and the Service Monitor Plasmoid won't
load, and instead display

> This object could not be created for the following reason:
> **Could not create a python ScriptEngine for the <Veromix/Service Monitor> widget

I tried to run them in plasma_windowed, which resulted in the following trace

    loic at morrigan:~$ plasma-windowed veromix-plasmoid
    QDBusConnection: session D-Bus connection created before
QCoreApplication. Application may misbehave.
    QDBusConnection: session D-Bus connection created before
QCoreApplication. Application may misbehave.
    Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9:
reading configurations from ~/.fonts.conf is deprecated.
    plasma-windowed(10510)/KSharedDataCache
KSharedDataCache::Private::mapSharedMemory: Failed to establish shared
memory mapping, will fallback to private memory -- memory usage will
increase
    plasma-windowed(10510)/python (plugin): Failed to import module
    Traceback (most recent call last):
      File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py",
line 23, in <module>
        import plasma_importer
      File "/usr/share/kde4/apps/plasma_scriptengine_python/plasma_importer.py",
line 113
        exec code in mod.__dict__
            ^
   SyntaxError: invalid syntax
   loic at morrigan:~$ X Error: BadValue (integer parameter out of range
for operation) 2
      Major opcode: 53 (X_CreatePixmap)
      Resource id:  0x0

And so on.
At line 113 in /usr/share/kde4/apps/plasma_scriptengine_python/plasma_importer.py,
I found

        if code is not None:
            try:
                if PY3:
                    exec(code in mod.__dict__)
                else:
                    exec code in mod.__dict__
            finally:
                code.close()
        return mod

which is doubly disturbing since
  1. `exec(code in mod.__dict__)` is indeed a syntax error in python3
  2. `exec code in mod.__dict__` is perfectly fine in python2 and
shouldn't yield a syntax error

I don't quite now what to do with this now. Any idea?

Cheers,

L
--
Loïc Grobol.



More information about the kubuntu-devel mailing list