Bug 270418

Summary: Parley fails to activate Google images script in German locale
Product: [Applications] parley Reporter: Ronny Standtke <Ronny.Standtke>
Component: scriptsAssignee: parley bug tracker <parley-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: digna.gonzalezotero, inge, lueck
Priority: NOR    
Version: 0.9.3   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ronny Standtke 2011-04-08 09:52:41 UTC
Version:           0.9.3 (using KDE 4.4.5) 
OS:                Linux

When using Parley with a German locale, it fails to activate the Google images script. The error message is:

-----------------------------
Ein Skript kann nicht aktiviert werden und ist deaktiviert worden. Dies bedeutet wahrscheinlich, dass das Skript Fehler enthält oder, dass die benötigten Pakete nicht installiert sind.
/usr/share/kde4/apps/parley/plugins/google_images.py

Details

Fehler in Datei /usr/share/kde4/apps/parley/plugins/google_images.py bei Zeile 250:
'ascii' codec can't encode character u'\xe4' in position 1: ordinal not in range(128)
Rückverfolgung:
File "/usr/share/kde4/apps/parley/plugins/google_images.py", line 250, in <module>
action1.statusTip = str(i18n("Fetches an image for the selected translation"))
-----------------------------

Reproducible: Always

Steps to Reproduce:
Start Parley on a system running with a German locale

Actual Results:  
Parley fails to activate the Google images script.

Expected Results:  
Parley starts without any error message
Comment 1 Burkhard Lück 2011-04-09 12:39:52 UTC
Confirmes in 4.6.2 (Kubuntu 10.10) and recent trunk + branch compiled from sources.
Reason are the 'umlauts' in the german translation of "Fetches an image for the selected translation" - "Lädt ein Bild für die ausgewählte Übersetzung herunter".

Changing 
action1.statusTip = str(i18n("Fetches an image for the selected translation"))
to
action1.statusTip = unicode(i18n("Fetches an image for the selected translation"),"latin1")
in google_images.py I get rid of that error.
Comment 2 dgonzalez003 2013-06-28 10:51:02 UTC
I had the same problem (in my case with Spanish locale) and your suggestion worked, so now I can enable the Google Images script. However, the script doesn't work. It appears a window in which I can write the word I want to look up, but when I push "Search", nothing happens.
Comment 3 Inge Wallin 2014-03-16 11:07:59 UTC
Moved to the 'scripts' component
Comment 4 Justin Zobel 2021-03-09 23:43:45 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.