First time here? Check out the FAQ!

Revision history  [back]

UTF-8 error in macOS version WingIDE

Hi,I'm trying to read this utf-8 file in this Python script:

import csv

with open(csv_filename) as csv_fd:
    reader = csv.reader(csv_fd, delimiter=';')
    next(reader)  
    for row in reader:
        print(row)

But get an error in WingIDE (macOS):

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode return
codecs.ascii_decode(input,
self.errors)[0]
builtins.UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 227: ordinal not in range(128)

There are "Unicode UTF-8" in "Preferences - Debugger - I/O" ("Encoding" fields).

If I run this script in Terminal there is no such kind of error.There is no error if I run this script in Windows version of WingIDE.

Thanks!

UTF-8 error in macOS version WingIDE

Hi,I'm trying to read this utf-8 file in this Python script:

import csv

with open(csv_filename) as csv_fd:
    reader = csv.reader(csv_fd, delimiter=';')
    next(reader)  
    for row in reader:
        print(row)

But get an error in WingIDE (macOS):

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode return
codecs.ascii_decode(input,
self.errors)[0]
builtins.UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 227: ordinal not in range(128)

There are "Unicode UTF-8" in "Preferences - Debugger - I/O" ("Encoding" fields).

If I run this script in Terminal there is no such kind of error.There is no error if I run this script in Windows version of WingIDE.

Thanks!

UTF-8 error in macOS version WingIDE

Hi,I'm trying to read this utf-8 file in this Python script:script: import csv

import csv

with open(csv_filename) as csv_fd: reader = csv.reader(csv_fd, delimiter=';') next(reader)
for row in reader: print(row)

print(row)​ But get an error in WingIDE (macOS):

File (macOS):File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/ascii.py", line 26, in decode return
codecs.ascii_decode(input,
self.errors)[0]
builtins.UnicodeDecodeError: return codecs.ascii_decode(input, self.errors)[0]builtins.UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 227: ordinal not in range(128)

There range(128)There are "Unicode UTF-8" in "Preferences - Debugger - I/O" ("Encoding" fields).

If fields).If I run this script in Terminal there is no such kind of error.There is no error if I run this script in Windows version of WingIDE.

Thanks!WingIDE.Thanks!