New submission from nirinA raseliarison <nirina.raseliari...@gmail.com>:

idle cannot save file with non ascii character, leading to:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib64/python3.8/tkinter/__init__.py", line 1883, in __call__
    return self.func(*args)
  File "/usr/lib64/python3.8/idlelib/multicall.py", line 176, in handler
    r = l[i](event)
  File "/usr/lib64/python3.8/idlelib/iomenu.py", line 199, in save
    else:
  File "/usr/lib64/python3.8/idlelib/iomenu.py", line 232, in writefile
    text = self.fixnewlines()
  File "/usr/lib64/python3.8/idlelib/iomenu.py", line 271, in encode
    encoded = chars.encode('ascii', 'replace')
NameError: name 'io' is not defined

just adding `import io` seems to fix this.

----------
assignee: terry.reedy
components: IDLE
messages: 373664
nosy: nirinA raseliarison, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: missing import io in iomenu.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41300>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to