I ran APT-GET update on a Debian based OS on Oracle VB. While it was running I messed around with some python code in IDLE 2.7.12 (I opened it with a terminal). After it finished updating, I tried saving my code. In the terminal that I opened IDLE with I got an error. It says this:
root@kali:~# idle
Idle opens, I load my code, I edit my code, then I click [FILE] [SAVE]
This happens
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1545, in __call__
return self.func(*args)
File "/usr/lib/python2.7/idlelib/ScriptBinding.py", line 140, in run_module_event
filename = self.getfilename()
File "/usr/lib/python2.7/idlelib/ScriptBinding.py", line 205, in getfilename
self.editwin.io.save(None)
File "/usr/lib/python2.7/idlelib/IOBinding.py", line 345, in save
if self.writefile(self.filename):
File "/usr/lib/python2.7/idlelib/IOBinding.py", line 378, in writefile
chars = self.encode(self.text.get("1.0", "end-1c"))
File "/usr/lib/python2.7/idlelib/IOBinding.py", line 450, in encode
dialog = EncodingMessage(self.editwin.top, enc)
File "/usr/lib/python2.7/idlelib/IOBinding.py", line 76, in __init__
self.root = top = Toplevel(master)
NameError: global name 'Toplevel' is not defined
Picture of my terminal with the error
I have already tried restarting the VB, and I've uninstalled, autocleaned, then re-installed IDLE with no luck.