question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run IDLE after enabling win-unicode-console

See original GitHub issue

As soon as I put

import win_unicode_console


win_unicode_console.enable()

in sitecustomize.py, IDLE won’t run anymore (without showing any error message).

If I comment out the #win_unicode_console.enable() function call (only keeping the import statement) IDLE works again.

If I open an IDLE shell, reenable the win_unicode_console.enable(), then try to restart the shell, the following error shows up:


Subprocess Startup Error

IDLE’s subprocess didn’t make connection. Either IDLE can’t start a subprocess or personal firewall software is blocking the connection.

OK

Another interesting observation is that calling py "C:\Users\a\AppData\Local\Programs\Python\Python35\Lib\idlelib\idle.pyw" in cmd works fine and IDLE gets launched. But if I call idle.pyw using pyw.exe (the way the IDLE shortcut works by default) then nothing happens:

C:\Users\a>pyw "C:\Users\a\AppData\Local\Programs\Python\Python35\Lib\idlelib\idle.pyw"

C:\Users\a>C:\Users\a\AppData\Local\Programs\Python\Python35\Lib\idlelib\idle.pyw

C:\Users\a>

I’m running

  • Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32
  • Windows 10 64-bit
  • win-unicode-console (0.5)

Does anyone know why this is happening?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Drekincommented, Nov 1, 2016

This is a bug. Quick fix is to wrap win_unicode_console.enable() with try:…; except Exception: pass. I’ll make a proper fix eventually.

0reactions
eric-wiesercommented, Jan 21, 2017

@Drekin: Seems that it might just be that pythonw fails generally - launching idle from the command line with python -m idlelib.idle works fine, but pythonw -m idlelib.idle fails

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Can't run IDLE after enabling win-unicode-console -
As soon as I put import win_unicode_console win_unicode_console.enable(). in sitecustomize.py , IDLE won't run anymore (without showing any error message).
Read more >
Issues · Drekin/win-unicode-console - GitHub
A Python package to enable Unicode support when running Python from Windows console. - Issues · Drekin/win-unicode-console.
Read more >
python - How to get IDLE to accept paste of Unicode characters?
The first step is to prevent IDLE from trying to encode all those nice Unicode characters into a character set that can't handle...
Read more >
Issue 1602: windows console doesn't print or input Unicode
msg58487 ‑ (view) Author: Mark Summerfield (mark) * Date: 2007‑12‑12 09:56 msg58621 ‑ (view) Author: Mark Summerfield (mark) * Date: 2007‑12‑14 11:31 msg58651 ‑ (view)...
Read more >
Config file and command line options - The Jupyter Notebook
This list of options can be generated by running the following and hitting enter: $ jupyter notebook --help. Application.log_datefmtUnicode.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found