First time here? Check out the FAQ!

andrewd76's profile - activity

2019-03-07 07:44:59 -0500 marked best answer 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!

2019-03-07 07:24:29 -0500 received badge Student (source)
2019-03-07 07:24:28 -0500 marked best answer Problem with stdin in python script (macOS)

Hi,

I have problem with this script in WingIDE:

http://introcs.cs.princeton.edu/pytho... use this file:http://introcs.cs.princeton.edu/python/15inout/usa.txt as "Run arguments" in "Launch configurations" (< usa.txt).

Libraries:

http://introcs.cs.princeton.edu/python/code/stdio.py
http://introcs.cs.princeton.edu/python/code/stddraw.pyI

run this file, but nothing happens.

If I run this file in Geany - it works.It works in Terminal too (python plotfilter.py < usa.txt)

Is it my mistake or bug in WingIDE?

Thanks!

2017-10-03 12:54:00 -0500 commented answer Problem with stdin in python script (macOS)

Well, I've just copy this file from Wing (win edition). It's OK now. Thanks for support!

2017-10-03 12:24:00 -0500 answered a question UTF-8 error in macOS version WingIDE

Thank you so much! It works

2017-10-03 04:19:00 -0500 asked a question UTF-8 error in macOS version WingIDE

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(

2017-08-28 15:11:00 -0500 commented answer Problem with stdin in python script (macOS)

Thank you for support! I've initiate debug outside of Wing and received an error: "Debugger: Debug process paused; pid=1

2017-08-27 05:46:00 -0500 asked a question Problem with stdin in python script (macOS)

Problem with stdin in python script (macOS) Hi,I have problem with this script in WingIDE:http://introcs.cs.princeton.ed