tutorial icon indicating copy to clipboard operation
tutorial copied to clipboard

[Portuguese] Enconding error when using latin extended characters

Open rsip22 opened this issue 7 years ago • 2 comments

Issue description

In Intro to Python, the Portuguese tutorial indicates some latin extended characters that will output an encoding error when used. (I will try and fix this issue as soon as I am able to).

Language

Portuguese

rsip22 avatar May 19 '18 19:05 rsip22

I was able to reproduce this error with Python 3.4.0, which was what the Python3 version the participant had on the computer. When running a script with the character "é", the output was this:

Traceback (most recent call last):
  File "script_yladie.py", line 6, in <module>
    print('5 \xe9 de fato maior que 2')
UnicodeEncodeError: 'ascii' codec can't encode character
'\xe9' in position 2: ordinal not in range(128)

This doesn't happen with Python 3.4.2 or with Python 3.5.3 (which is the version recommended for installation in the Portuguese tutorial).

I don't think the tutorial should be changed (for instance, reverting those strings to English), but organizers have to be aware they will have to find a workaround for this, if it's not possible to upgrade the Python version on the computer to Python 3.5.

rsip22 avatar May 21 '18 04:05 rsip22

If there is no issue for 3.5.3 and the tutorial recommends that version, that's very good!

The organizer should make every effort to prepare participant environment or provide the environment. Can you give an example for when it is not possible to upgrade to Python 3.5?

Consider using virtualenv:

virtualenv -p python3.5 --no-site-packages /home/rsip22/djangogirls

or anaconda:

conda install python=3.5

ktalik avatar Jun 02 '18 22:06 ktalik