superman268 / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-6: ordinal not in range(128) #701

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Windows XP SP3 (32 bit) Russian with python-2.7.3 installed
2. Download and unpack PyScripter-v2.5.3.zip
3. Run PyScripter.exe - you'll see "PyScripter - модуль1"
4. Once you start to modify the code - for me it's enough to type just several 
characters - you get this crazy message "exceptions.UnicodeEncodeError: 'ascii' 
codec can't encode characters in position 0-5: ordinal not in range(128)."

What is the expected output? 
Program should just work without crazy exceptions and so on.

What do you see instead?
"exceptions.UnicodeEncodeError: 'ascii' codec can't encode characters in 
position 0-5: ordinal not in range(128)."

What version of the product are you using? On what operating system?
PyScripter-v2.5.3, Windows XP SP3 (32 bit) Professional Russian 

Original issue reported on code.google.com by dvv8...@gmail.com on 16 Nov 2012 at 1:21

GoogleCodeExporter commented 9 years ago
To reproduce the issue, it's enough just to select Russian language (View -> 
Language -> Russian) and restart PyScripter.exe.

Original comment by dv...@ukr.net on 27 Nov 2012 at 2:17

GoogleCodeExporter commented 9 years ago
+ probably you need one additional setting under Windows:
Control Panel -> Regional and Language Options -> Advanced -> set the language 
of the non-Unicode programs to "Russian".

Original comment by dv...@ukr.net on 27 Nov 2012 at 2:25

GoogleCodeExporter commented 9 years ago
It's problem with no unicode characters(cyrillic) in path of you script.
reproduce:
Create a folder with cyrillic name and open any script from it

Original comment by pelec...@gmail.com on 15 Dec 2012 at 9:46

GoogleCodeExporter commented 9 years ago
Confirm problem.
Win7-x64 / ActivePython 2.7.2.5 / PyScripter 2.5.3 x86

if path to script (or script name) has non latin characters (ex. cyrillic) i 
have same error message:
----
UnicodeEncodeError: 'ascii' codec can't encode characters in position 23-28: 
ordinal not in range(128)               
----

this type of error is very frustrating when you just start to learn python 
and prevent from using PyScripter as IDE

Original comment by chursin....@gmail.com on 22 Mar 2013 at 3:45

GoogleCodeExporter commented 9 years ago
I receive the same error if I use a PIPE symbol (e.g. for bitwise operations. 
Example:

info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
info.wShowWindow = win32con.SW_SHOWMINIMIZED

The Pipe in line 2 causes this error and thus the script can not be executed in 
PyScripter.

Original comment by rschra...@gmail.com on 29 Apr 2014 at 12:22

GoogleCodeExporter commented 9 years ago
Please have a look at 
http://pyscripter.blogspot.gr/2012/02/dreaded-unicode-encodedecode-errors.html.

Also see the comments at Issue 427

Original comment by pyscripter on 26 Mar 2015 at 5:09