You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pasting bad Unicode data to editor kills the process #32
Pasting just the snake does nothing. Pasting the two quotes with the snake inside raises this error. Both shell and file editor. Thonny 3.2.1 on Windows
I guess I need to add a guard to paste and load operations and present a warning/confirmation dialog when unsupported characters are found in the input.
Understood, but in case it's useful, here's another way to reproduce this:
Use Thonny's manage-plugins window to install black
In the Shell window, type !black myfile.py
Boom, Thonny crashes with
X Error of failed request: BadLength (poly request too large or internal Xlib length error)
Major opcode of failed request: 139 (RENDER)
Minor opcode of failed request: 20 (RenderAddGlyphs)
Serial number of failed request: 10827
Current serial number in output stream: 10837
As a workaround I wondered if there was a way to turn off the emojis in the black output, but it seems that's something the black developers are stubbornly resistant to 😖 psf/black#1270
Activity
aivarannamaa commentedon Oct 2, 2014
Original changes by Aivar Annamaa (Bitbucket: aivarannamaa
GitHub: aivarannamaa
).
aivarannamaa commentedon Feb 4, 2016
Original changes by Aivar Annamaa (Bitbucket: aivarannamaa
GitHub: aivarannamaa
).
aivarannamaa commentedon Feb 4, 2016
Haven't seen this for a while. Don't know how to replicate. Hopefully went away.
aivarannamaa commentedon Feb 4, 2016
Original changes by Aivar Annamaa (Bitbucket: aivarannamaa
GitHub: aivarannamaa
).
Ivoz commentedon Sep 27, 2019
Hi @aivarannamaa maybe I found a way to replicate this :D
I went to https://rushter.com/blog/python-strings-and-memory/ and tried to paste exactly '🐍' from its code box .
Pasting just the snake does nothing. Pasting the two quotes with the snake inside raises this error. Both shell and file editor. Thonny 3.2.1 on Windows
aivarannamaa commentedon Sep 28, 2019
Thank you!
I guess I need to add a guard to paste and load operations and present a warning/confirmation dialog when unsupported characters are found in the input.
https://stackoverflow.com/questions/23530080/how-to-print-non-bmp-unicode-characters-in-tkinter-e-g
aivarannamaa commentedon Dec 19, 2019
Needs to be tested with Python 3.7.6. Hopefully it got fixed by python/cpython#16581
4 remaining items
kcarnold commentedon Apr 1, 2020
Another, probably related, Unicode bug: paste any emoji (e.g., 💬) into an empty editor. My editor then looks like
💬💬
It gets worse: go to the beginning of the line and press Delete. Thonny hangs.
My guess is that the rebuild will fix this one too.
aivarannamaa commentedon Apr 1, 2020
Unfortunately there is nothing I can do about it. Let's hope next Tk version to be included in Python fixes this.
lurch commentedon May 25, 2020
Understood, but in case it's useful, here's another way to reproduce this:
black!black myfile.pylurch commentedon May 25, 2020
As a workaround I wondered if there was a way to turn off the emojis in the
blackoutput, but it seems that's something theblackdevelopers are stubbornly resistant to 😖 psf/black#1270aivarannamaa commentedon Jun 2, 2020
I hope they will bundle Tk 8.6.10 with Python 3.9. If this doesn't help, then I have to preprocess the output before reaching the shell.
aivarannamaa commentedon Dec 26, 2021
Closing, as things are much better with Tcl/Tk 8.6.12 (to be bundled with Thonny 4.0)