IDLE just straight up stopped working on my desktop, as in when I try and open it nothing happens, it won't even give me an error message. It works fine on my laptop however. Right-clicking and trying to edit a script does nothing as well. This happened completely overnight, I didn't change or install anything. I have absolutely no idea how this happened.
I've tried reinstalling and copying the files from my laptop to my desktop, nothing has worked so far.
(Answer adapted from comment with solution.) When starting up, IDLE accesses both its own files in Lib/idlelib and user customization files in $HOME/.idlerc. The latter are shared across all python/IDLE installations on the machine. The error message you got indicates that some file 'suddenly' became corrupted so that it was seen as mis-encoded. Since replacing the idlelib files did not fix the issue, the problem likely had to be in a .idlerc file. Your comment indicates that this must have been the case.
With no .idlerc present, IDLE will recreate one from scratch. Any customizations you had can be re-created with the options dialog. You can either delete the old version or try to poke around to retrieve some of the data.
I will look into adding something to the IDLE doc about .idlerc corruption being a possible problem, and the solution.
EDIT: Bit can occasionally go bad on a hard disk, especially after several years. Has happened to me. To fix, only only needs to delete the bad file or file within .idlerc if .idlerc itself is not the problem. An IDLE error message may indicate which. Or one can try looking at each file in an editor for any obvious garbage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With