0

When I first tried using Parley 1.0.0 (which I had installed using the Software Manager in Mint 17, 32-bit), I downloaded many vocab files via the built-in mechanism, and when I tried the first one, it told me all five of the stock script add-ons failed, all with the message in the title. It also says that for any of them that I try to re-enable from Parley's menu item Scripts -> Script Manager.

If I open a terminal:

$ python --version
Python 2.7.6

So...I'm not sure what it means or how to fix it. (Wouldn't the interpreter for a .py file be Python? Why wouldn't it be able to find it on a stock install?)

The full error given is:

Error in file /usr/share/kde4/apps/parley/plugins/example.py at line -1: Failed to determine interpreter for scriptfile "/usr/share/kde4/apps/parley/plugins/example.py"

If I run Parley from a Terminal it gives more information, but the last line is all it spits out at the actual time of the error, and it doesn't give anything more than the popup did:

$ parley
Could not add child element to parent element because the types are incorrect.
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_lesson_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_wordtype_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_inflection_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_comparison_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_multiplechoice_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_synonym_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_antonym_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_falsefriend_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_pronunciation_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_image_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_summary_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_audio_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_browser_dock" with KXMLGUIFactory! 
parley(10341)/kdeui (kdelibs): Attempt to use QAction "show_latex_dock" with KXMLGUIFactory! 
parley(10341)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "google_images"
parley(10341)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "parley_example_script"
parley(10341)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "google_dict"
parley(10341)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "wiktionary_sound"
parley(10341)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "leo_dict"

(parley:10341): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

(parley:10341): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
Kross: "Error error=Failed to determine interpreter for scriptfile "/usr/share/kde4/apps/parley/plugins/example.py" lineno=-1 trace=
" 

The first line printed immediately. The following kdelibs lines printed when I clicked Editor (after loading a downloaded vocab file). The next five came when I clicked Scripts->Script Manager. The CRITICAL lines printed when I clicked to toggle the checkbox to the on position, next to Example Parley Script. The last line printed (and the error popped up) when I clicked OK.

1
  • Googling Parley has a lot of pollution.
    – Kev
    Dec 4, 2014 at 9:20

1 Answer 1

1

Bash doesn't set the interpreter based on the file extension. It uses the first line of the file, commonly referred to as the "shebang" or "crunchbang". This is what allows an executable python script to be run directly.

Some examples:

#!/bin/bash
#!/usr/bin/python2
#!/usr/bin/env python
#!/usr/bin/env ruby

You should inspect these "stock scripts" and see if they have a shebang line. If not, report it as a bug to the upstream project. I'm not familiar with parley, but you should also check if they have an option for a default interpreter.

9
  • I didn't see any interpreter options. As for the scripts, the script manager does not appear to tell the location or even the exact filename of the script, and they weren't in ~/.kde/share/apps/kvtml like the vocab files, or anywhere near by that I could see. I'll keep looking...
    – Kev
    Dec 4, 2014 at 9:17
  • api.kde.org/stable/kdeedu-apidocs/parley/html/… claims it can be found "usually" in /usr/share/apps/parley/plugins/ but that wasn't true either.
    – Kev
    Dec 4, 2014 at 9:21
  • Yeesh, $ find / -type d -iname 'parley' found only ~/.kde/share/apps/parley, which I had also already tried (it contains only two files, neither are .py.)
    – Kev
    Dec 4, 2014 at 9:24
  • Although, that kde.org link also shows their example script containing a shebang line like you had shown. Since the example script was one of the five stock plugins, which all fail, I think that this is probably not the cause of the failure. (Also, would a fully GUI KDE app use bash to invoke python anyway?) Nonetheless +1 for places to look.
    – Kev
    Dec 4, 2014 at 9:27
  • 1
    Do you have the kross command available? It is possible that it is a packaging error, where it is needed but not declared as a dependency of the package and thus not installed. Dec 4, 2014 at 20:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .