Description
@Miles-Williams commented on Tue Feb 21 2017
Fetched the word-count exercise for Python and the test file won't open in IDLE.
I'm on a Win7 32bit machine and running Python 3.6. I've had no issues with the previous 6 exercises.
When I try to open it by right-clicking and selecting "Edit in IDLE" it just fails to open. It's not that IDLE can't open the file, IDLE just doesn't open at all.
If I try opening it from within an already running instance of IDLE it opens a new "untitled" file.
I am not having any issues with any of my other Python files, just this one.
I have deleted the word-count directory and its contents and re-fetched the exercise but still the same issue.
@NobbZ commented on Tue Feb 21 2017
The file itself seems to be OK. You can see it at https://github.com/exercism/xpython/blob/master/exercises/word-count/word_count_test.py
- What size does your filemanager show?
- Can you read it using notepad.exe?
- Are you able to run it without IDLE from the cmd-prompt?
python word_count_test.py
, make surepython.exe
is in yourPATH
though.
@Miles-Williams commented on Wed Feb 22 2017
Hi Norbert,
3KB file size.
I can open it for editing in every editor I've tried (over 10 different editors) except for IDLE.
Also, when I try to open it from an already running instance of IDLE not only does it fail and give me an "untitled" document, I am also unable to close down that instance of IDLE unless I use Windows task manager. And I noticed it was using up considerably more system resources than other Python instances.
I am able to run the file through Windows PowerShell and cmd.exe.
Thank you.
-------- Original message --------
From: Norbert Melzer notifications@github.com
Date: 21/02/2017 5:33 PM (GMT+10:00)
To: "exercism/exercism.io" exercism.io@noreply.github.com
Cc: Miles Williams miles.williams@weidmuller.com.au, Author author@noreply.github.com
Subject: Re: [exercism/exercism.io] Problems with Python word_count_test (#3385)
The file itself seems to be OK. You can see it at https://github.com/exercism/xpython/blob/master/exercises/word-count/word_count_test.py
- What size does your filemanager show?
- Can you read it using notepad.exe?
- Are you able to run it without IDLE from the cmd-prompt? python word_count_test.py, make sure python.exe is in your PATH though.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubexercism/exercism#3385 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYkDAW_8-rJIN4EegxARNkIB3UbjXIiOks5reoUYgaJpZM4MGzmb.
@NobbZ commented on Wed Feb 22 2017
So it seems that the file is OK but IDLE is broken. I will try to install python as well as IDLE once I have hands back on a computer (~3 hours from now) and do some experiments.
In the meantime, you can try to re-install/update IDLE.
Oh, and please check if you have the same problem when
- downloading the file manually from github (link above)
- manually copy-pasting the content into IDLE and then save it and reopen
@Miles-Williams commented on Wed Feb 22 2017
I had tried re-installed Python already, unsuccessfully, sadly.
IDLE worked fine with all the previous exercises, and I've not had a single issue with IDLE in the last few years at all other than this one file.
I'm very confused.
Tomorrow I'm going to roll back to an older version of Python and see if it works. I'll keep you posted, unless you find the problem in the mean time.
Thank you.
-------- Original message --------
From: Norbert Melzer notifications@github.com
Date: 22/02/2017 5:48 PM (GMT+10:00)
To: "exercism/exercism.io" exercism.io@noreply.github.com
Cc: Miles Williams miles.williams@weidmuller.com.au, Author author@noreply.github.com
Subject: Re: [exercism/exercism.io] Problems with Python word_count_test (#3385)
So it seems that the file is OK but IDLE is broken. I will try to install python as well as IDLE once I have hands back on a computer (~3 hours from now) and do some experiments.
In the meantime, you can try to re-install/update IDLE.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubexercism/exercism#3385 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYkDAb7tG4oysXiLTiHhE3-0FKPfORBWks5re9o7gaJpZM4MGzmb.
@NobbZ commented on Wed Feb 22 2017
OK, I tried it locally and observe the same behaviour as you. So I tried to start IDLE from cmd and got a python stack in my face:
~/AppData/Local/Programs/Python/Python36-32/python ~/AppData/Local/Programs//Python/Python36-32/Lib/idlelib/idle.pyw word_count_test.py
Traceback (most recent call last):
File "C:/Users/NobbZ/AppData/Local/Programs/Python/Python36-32/Lib/idlelib/idle.pyw", line 17, in <module>
idlelib.pyshell.main()
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\pyshell.py", line 1481, in main
if flist.open(filename) is None:
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\filelist.py", line 37, in open
edit = self.EditorWindow(self, filename, key)
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\pyshell.py", line 118, in __init__
EditorWindow.__init__(self, *args)
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\editor.py", line 247, in __init__
if io.loadfile(filename):
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\iomenu.py", line 241, in loadfile
self.text.insert("1.0", chars)
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\percolator.py", line 28, in insert
self.top.insert(index, chars, tags)
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\undo.py", line 83, in insert
self.addcmd(InsertCommand(index, chars, tags))
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\undo.py", line 118, in addcmd
cmd.do(self.delegate)
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\undo.py", line 219, in do
text.insert(self.index1, self.chars, self.tags)
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\colorizer.py", line 101, in insert
self.delegate.insert(index, chars, tags)
File "C:\Users\NobbZ\AppData\Local\Programs\Python\Python36-32\lib\idlelib\redirector.py", line 150, in __call__
return self.tk_call(self.orig_and_operation + args)
_tkinter.TclError: character U+1f596 is above the range (U+0000-U+FFFF) allowed by Tcl
So in fact, it is a mix of the files fault as well as IDLEs fault. IDLE 2.7 does work well though...
Please report a bug at IDLEs tracker. The faulty line seems to be this one: word_count('до🖖свидания!')
, IDLE crashes on paste.
I would be happy if @exercism/python would look into this as well, therefore I'll move the thread into the python repository.