Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Python word_count_test #416

Closed
NobbZ opened this issue Feb 22, 2017 · 2 comments
Closed

Problems with Python word_count_test #416

NobbZ opened this issue Feb 22, 2017 · 2 comments

Comments

@NobbZ
Copy link
Member

NobbZ commented Feb 22, 2017

@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 sure python.exe is in your PATH 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.

@behrtam
Copy link
Contributor

behrtam commented Feb 22, 2017

This seems to be a known issue21084 with tkinter/python.

One way would be to remove the unicode stuff, not only in this exercise – exercism/problem-specifications#441.

@jonmcalder
Copy link
Member

I agree with @behrtam: surely it would be better to remove the unicode test case? There are no unicode test cases included at x-common either which suggests to me that managing character sets isn't really within the core scope of the exercise.

behrtam added a commit to behrtam/python that referenced this issue Mar 8, 2017
ErikSchierboom added a commit to ErikSchierboom/python that referenced this issue Jan 21, 2021
* Create common working area

* Extract Concepts from v2 exercise: reverse-string  (exercism#657)

* Create reverse-string.md

* Update reverse-string.md

* Add Concepts from v2 exercise: variable-length-quantity (exercism#503)

* Add first concepts group

* Improved concepts as per PR review

* Adds concept from binary-search-tree (exercism#501)

* Add initial list (exercism#463)

First pass concepts for `allergies` to address exercism#460

* Initial list of concepts (exercism#462)

First pass list of concepts to address exercism#459

* Add Concepts for v2 exercise: phone-number (exercism#420)

* Add phone-number Python concepts

* Small update to index access and slice topics.

* Add notes from review.
 - more information about classes, inheritance
 - flesh out privacy, public and non-public
 - clarify wording around iterables and index/slice access

* One more note about brackets and strings.

* Add Concepts for v2 exercise: hamming (exercism#418)

* Add concepts for hamming

* Add note about tuple unpacking.

* Add notes about polymorphism, builtins, and dunder methods.

* Some whitespace fixes.

* [WIP] `clock` exercise concepts. (exercism#395)

* Extract Concepts from v2 exercise: markdown (exercism#540)

* Initial commit for markdown exercise concepts.

* Concept starter for markdown

* Added detail to Markdown concepts

* Final edits before harmonization

Final Markdown edits before we merge and harmonize.

* Add Concepts for v2 exercise: matrix (exercism#416)

* `matrix` exercise concepts (issue exercism#386)

First pass of concepts for `matrix ` exercise in python.  Pretty sure this is too detailed, but wanted to get something for review before proceeding with additional exercises.

* Edits to better match exercism#290 Formatting

Edited concepts to better match the formatting of issue exercism#290

* Typo correction

* added title

* Extract Concepts from v2 exercise: rna-transcription (exercism#520)

* Beginning of Concepts for rna-transcription

* More detailed concepts for rna-trranscription

More detailed concepts for rna-transcription exrcise.

* Added title

* Extract Concepts from v2 exercise: robot-simulator (exercism#538)

* Beginning of concepts for robot-simulator.

* WIP Concepts

* Additional detail for concepts

* Detail third pass

Third pass on adding concept detail.

* Additional detail for concepts.

* Edits per PR Feedback

Numerous spelling corrections.  Additional edits to address comments from last review.

* [WIP] Concept implementation instructions (exercism#665)

* Adds instructions for exercise implementation

* Adds correction as per PR reviews

* Harmonize, part 1 (exercism#705)

* fix relative links in references/README.md

* First pass at harmonization

Shifts all documents to a common format, adds minimal link tagging to
the "concept" currently listed in each file. These will really need
multiple more passes, as they diverge from each other even when
describing the same topic. Many extraneous topics have crept in, added
in an "aspirational" fashion to the exercises; we may need to trim some
of that.

* Pulling in examples from BethanyG

* [WIP] Extracted concept unification (exercism#793)

* Unification of extracted concepts

* Typos and duplicates remove

* Duplicates concept unification

* Concepts have now links to original file

* Update languages/reference/README.md

Co-Authored-By: Erik Schierboom <erik_schierboom@hotmail.com>

Co-authored-by: khoivan88 <33493502+khoivan88@users.noreply.github.com>
Co-authored-by: David G <davidgerva@gmail.com>
Co-authored-by: Ashley Drake <a.l.drake713@gmail.com>
Co-authored-by: Pedro Romano <pedro@paparomeo.net>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
ErikSchierboom added a commit to ErikSchierboom/python that referenced this issue Jan 22, 2021
* Create common working area

* Extract Concepts from v2 exercise: reverse-string  (exercism#657)

* Create reverse-string.md

* Update reverse-string.md

* Add Concepts from v2 exercise: variable-length-quantity (exercism#503)

* Add first concepts group

* Improved concepts as per PR review

* Adds concept from binary-search-tree (exercism#501)

* Add initial list (exercism#463)

First pass concepts for `allergies` to address exercism#460

* Initial list of concepts (exercism#462)

First pass list of concepts to address exercism#459

* Add Concepts for v2 exercise: phone-number (exercism#420)

* Add phone-number Python concepts

* Small update to index access and slice topics.

* Add notes from review.
 - more information about classes, inheritance
 - flesh out privacy, public and non-public
 - clarify wording around iterables and index/slice access

* One more note about brackets and strings.

* Add Concepts for v2 exercise: hamming (exercism#418)

* Add concepts for hamming

* Add note about tuple unpacking.

* Add notes about polymorphism, builtins, and dunder methods.

* Some whitespace fixes.

* [WIP] `clock` exercise concepts. (exercism#395)

* Extract Concepts from v2 exercise: markdown (exercism#540)

* Initial commit for markdown exercise concepts.

* Concept starter for markdown

* Added detail to Markdown concepts

* Final edits before harmonization

Final Markdown edits before we merge and harmonize.

* Add Concepts for v2 exercise: matrix (exercism#416)

* `matrix` exercise concepts (issue exercism#386)

First pass of concepts for `matrix ` exercise in python.  Pretty sure this is too detailed, but wanted to get something for review before proceeding with additional exercises.

* Edits to better match exercism#290 Formatting

Edited concepts to better match the formatting of issue exercism#290

* Typo correction

* added title

* Extract Concepts from v2 exercise: rna-transcription (exercism#520)

* Beginning of Concepts for rna-transcription

* More detailed concepts for rna-trranscription

More detailed concepts for rna-transcription exrcise.

* Added title

* Extract Concepts from v2 exercise: robot-simulator (exercism#538)

* Beginning of concepts for robot-simulator.

* WIP Concepts

* Additional detail for concepts

* Detail third pass

Third pass on adding concept detail.

* Additional detail for concepts.

* Edits per PR Feedback

Numerous spelling corrections.  Additional edits to address comments from last review.

* [WIP] Concept implementation instructions (exercism#665)

* Adds instructions for exercise implementation

* Adds correction as per PR reviews

* Harmonize, part 1 (exercism#705)

* fix relative links in references/README.md

* First pass at harmonization

Shifts all documents to a common format, adds minimal link tagging to
the "concept" currently listed in each file. These will really need
multiple more passes, as they diverge from each other even when
describing the same topic. Many extraneous topics have crept in, added
in an "aspirational" fashion to the exercises; we may need to trim some
of that.

* Pulling in examples from BethanyG

* [WIP] Extracted concept unification (exercism#793)

* Unification of extracted concepts

* Typos and duplicates remove

* Duplicates concept unification

* Concepts have now links to original file

* Update languages/reference/README.md

Co-Authored-By: Erik Schierboom <erik_schierboom@hotmail.com>

Co-authored-by: khoivan88 <33493502+khoivan88@users.noreply.github.com>
Co-authored-by: David G <davidgerva@gmail.com>
Co-authored-by: Ashley Drake <a.l.drake713@gmail.com>
Co-authored-by: Pedro Romano <pedro@paparomeo.net>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
ErikSchierboom added a commit to ErikSchierboom/python that referenced this issue Jan 26, 2021
* Create common working area

* Extract Concepts from v2 exercise: reverse-string  (exercism#657)

* Create reverse-string.md

* Update reverse-string.md

* Add Concepts from v2 exercise: variable-length-quantity (exercism#503)

* Add first concepts group

* Improved concepts as per PR review

* Adds concept from binary-search-tree (exercism#501)

* Add initial list (exercism#463)

First pass concepts for `allergies` to address exercism#460

* Initial list of concepts (exercism#462)

First pass list of concepts to address exercism#459

* Add Concepts for v2 exercise: phone-number (exercism#420)

* Add phone-number Python concepts

* Small update to index access and slice topics.

* Add notes from review.
 - more information about classes, inheritance
 - flesh out privacy, public and non-public
 - clarify wording around iterables and index/slice access

* One more note about brackets and strings.

* Add Concepts for v2 exercise: hamming (exercism#418)

* Add concepts for hamming

* Add note about tuple unpacking.

* Add notes about polymorphism, builtins, and dunder methods.

* Some whitespace fixes.

* [WIP] `clock` exercise concepts. (exercism#395)

* Extract Concepts from v2 exercise: markdown (exercism#540)

* Initial commit for markdown exercise concepts.

* Concept starter for markdown

* Added detail to Markdown concepts

* Final edits before harmonization

Final Markdown edits before we merge and harmonize.

* Add Concepts for v2 exercise: matrix (exercism#416)

* `matrix` exercise concepts (issue exercism#386)

First pass of concepts for `matrix ` exercise in python.  Pretty sure this is too detailed, but wanted to get something for review before proceeding with additional exercises.

* Edits to better match exercism#290 Formatting

Edited concepts to better match the formatting of issue exercism#290

* Typo correction

* added title

* Extract Concepts from v2 exercise: rna-transcription (exercism#520)

* Beginning of Concepts for rna-transcription

* More detailed concepts for rna-trranscription

More detailed concepts for rna-transcription exrcise.

* Added title

* Extract Concepts from v2 exercise: robot-simulator (exercism#538)

* Beginning of concepts for robot-simulator.

* WIP Concepts

* Additional detail for concepts

* Detail third pass

Third pass on adding concept detail.

* Additional detail for concepts.

* Edits per PR Feedback

Numerous spelling corrections.  Additional edits to address comments from last review.

* [WIP] Concept implementation instructions (exercism#665)

* Adds instructions for exercise implementation

* Adds correction as per PR reviews

* Harmonize, part 1 (exercism#705)

* fix relative links in references/README.md

* First pass at harmonization

Shifts all documents to a common format, adds minimal link tagging to
the "concept" currently listed in each file. These will really need
multiple more passes, as they diverge from each other even when
describing the same topic. Many extraneous topics have crept in, added
in an "aspirational" fashion to the exercises; we may need to trim some
of that.

* Pulling in examples from BethanyG

* [WIP] Extracted concept unification (exercism#793)

* Unification of extracted concepts

* Typos and duplicates remove

* Duplicates concept unification

* Concepts have now links to original file

* Update languages/reference/README.md

Co-Authored-By: Erik Schierboom <erik_schierboom@hotmail.com>

Co-authored-by: khoivan88 <33493502+khoivan88@users.noreply.github.com>
Co-authored-by: David G <davidgerva@gmail.com>
Co-authored-by: Ashley Drake <a.l.drake713@gmail.com>
Co-authored-by: Pedro Romano <pedro@paparomeo.net>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
ErikSchierboom added a commit to ErikSchierboom/python that referenced this issue Jan 27, 2021
* Create common working area

* Extract Concepts from v2 exercise: reverse-string  (exercism#657)

* Create reverse-string.md

* Update reverse-string.md

* Add Concepts from v2 exercise: variable-length-quantity (exercism#503)

* Add first concepts group

* Improved concepts as per PR review

* Adds concept from binary-search-tree (exercism#501)

* Add initial list (exercism#463)

First pass concepts for `allergies` to address exercism#460

* Initial list of concepts (exercism#462)

First pass list of concepts to address exercism#459

* Add Concepts for v2 exercise: phone-number (exercism#420)

* Add phone-number Python concepts

* Small update to index access and slice topics.

* Add notes from review.
 - more information about classes, inheritance
 - flesh out privacy, public and non-public
 - clarify wording around iterables and index/slice access

* One more note about brackets and strings.

* Add Concepts for v2 exercise: hamming (exercism#418)

* Add concepts for hamming

* Add note about tuple unpacking.

* Add notes about polymorphism, builtins, and dunder methods.

* Some whitespace fixes.

* [WIP] `clock` exercise concepts. (exercism#395)

* Extract Concepts from v2 exercise: markdown (exercism#540)

* Initial commit for markdown exercise concepts.

* Concept starter for markdown

* Added detail to Markdown concepts

* Final edits before harmonization

Final Markdown edits before we merge and harmonize.

* Add Concepts for v2 exercise: matrix (exercism#416)

* `matrix` exercise concepts (issue exercism#386)

First pass of concepts for `matrix ` exercise in python.  Pretty sure this is too detailed, but wanted to get something for review before proceeding with additional exercises.

* Edits to better match exercism#290 Formatting

Edited concepts to better match the formatting of issue exercism#290

* Typo correction

* added title

* Extract Concepts from v2 exercise: rna-transcription (exercism#520)

* Beginning of Concepts for rna-transcription

* More detailed concepts for rna-trranscription

More detailed concepts for rna-transcription exrcise.

* Added title

* Extract Concepts from v2 exercise: robot-simulator (exercism#538)

* Beginning of concepts for robot-simulator.

* WIP Concepts

* Additional detail for concepts

* Detail third pass

Third pass on adding concept detail.

* Additional detail for concepts.

* Edits per PR Feedback

Numerous spelling corrections.  Additional edits to address comments from last review.

* [WIP] Concept implementation instructions (exercism#665)

* Adds instructions for exercise implementation

* Adds correction as per PR reviews

* Harmonize, part 1 (exercism#705)

* fix relative links in references/README.md

* First pass at harmonization

Shifts all documents to a common format, adds minimal link tagging to
the "concept" currently listed in each file. These will really need
multiple more passes, as they diverge from each other even when
describing the same topic. Many extraneous topics have crept in, added
in an "aspirational" fashion to the exercises; we may need to trim some
of that.

* Pulling in examples from BethanyG

* [WIP] Extracted concept unification (exercism#793)

* Unification of extracted concepts

* Typos and duplicates remove

* Duplicates concept unification

* Concepts have now links to original file

* Update languages/reference/README.md

Co-Authored-By: Erik Schierboom <erik_schierboom@hotmail.com>

Co-authored-by: khoivan88 <33493502+khoivan88@users.noreply.github.com>
Co-authored-by: David G <davidgerva@gmail.com>
Co-authored-by: Ashley Drake <a.l.drake713@gmail.com>
Co-authored-by: Pedro Romano <pedro@paparomeo.net>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: Erik Schierboom <erik_schierboom@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants