Error: The save file operation failed (IDLE - Python 3.10)

Hello,

After updating system to Monterey 12.0.1 I can not save my files in IDLE (Python 3.10), I tried uninstalling Python and reinstalling it, also I tried to turn off computer and after one minute turn on. Nothing helped.


After choose "save as..." all I have is: "The save file operation failed. The save file operation failed to connect to the open and save panel service."


Could anyone can help me?


Best regards.



MacBook Air

Posted on Oct 29, 2021 5:20 AM

Reply

Similar questions

3 replies

Oct 29, 2021 6:35 AM in response to katarzyna185

In Big Sur 11.6.1, if you attempt to save any code that you have entered either in idle, or more appropriate for Python 3.10, idle3, you get more than the Python code, as the idle header will also get saved to the file, rendering it useless until that header info is removed:



What I recommend that you do is to use idle3 to test the results of various Python 3.10 code, and when it does what you want, select and copy/paste the working code into a proper programmer's editor like Sublime Text 4. This is what I have done for years.


Next week, I will receive my M1 Pro MacBook Pro with Monterey, and I will be installing my Python 3.10 development environment on it.


Also, Barney-15E is correct that if you are launching idle, and not idle3, you are getting Tk/Tcl 8.5.9 which is long deprecated on macOS and may actually break now with Monterey. Python 3.10 includes the current Tk/Tcl bits in its bundle and is not dependent on what Apple has failed to update.


Use the following code to determine the Tk/Tcl version:


#!/usr/bin/env python3

import sys

try:
    import Tkinter as tk      # Python 2
except ImportError:
    import tkinter as tk      # Python 3

print("Tcl Version: {}".format(tk.Tcl().eval('info patchlevel')))
print("Tk Version: {}".format(tk.Tk().eval('info patchlevel')))
sys.exit()




Oct 29, 2021 6:15 AM in response to katarzyna185

My guess would be that IDLE (or more likely tkinter or tcl/tk) needs an update.

Based on the error, it is trying to open the file save dialog in the GUI.

I don't know if that is a tool within IDLE or if it is trying to open the Open/Save file framework in macOS.


Monterey removed some of the stuff in /usr/bin, so it is possible whatever it used to open the save dialog is missing.


Regardless of the cause, it appears IDLE needs an update to work in Monterey.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Error: The save file operation failed (IDLE - Python 3.10)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.