LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Python script ranwhen.py not working on Slackware 14.0 KDE 32 bit (https://www.linuxquestions.org/questions/slackware-14/python-script-ranwhen-py-not-working-on-slackware-14-0-kde-32-bit-4175486478/)

Bourbon 12-01-2013 04:38 PM

Python script ranwhen.py not working on Slackware 14.0 KDE 32 bit
 
Hi All,

Was wishing to try out ranwhen.py on Slackware 14.0 32 bit KDE, have been installing it and Python 3 too (SlackBuild) but the terminal gives back the following output:
Quote:

Traceback (most recent call last):
File "./ranwhen.py", line 267, in <module>
style_text(" days", fgcolor = time_text_color) + ")")
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' in position 59: ordinal not in range(256)
Please, someone knows how to solve the issue? Thank you.

https://github.com/p-e-w/ranwhen

ponce 12-02-2013 09:08 AM

here it runs fine with
Code:

LANG=en_US.utf8 python3 ranwhen.py

Bourbon 12-02-2013 09:48 AM

@Ponce: thank you very much for your kind help, I appreciate.
The command you suggested to me works but with small graphic issue as you can check following the links:
http://imageshack.us/a/img201/9829/elvu.png
http://imageshack.us/a/img809/387/v6oo.png
Best Regards

Edit
Same result with:
$ LANG=it_IT.utf8 python3 ranwhen.py

Bourbon 12-18-2013 05:11 AM

The graphical issue is solved too selecting "UTF8" to the terminal profile


All times are GMT -5. The time now is 06:10 PM.