Search code examples
python-3.xsavegeany

Can't save a python file in any IDE


I'm currently starting to learn Python on Windows 10 and to do so I've installed Geany 1.34.1 and Python 3.7.2 (with the PATH option) as instructed in my book.

I then created a new file and tried to save it in some folder on my C: disk where both softwares are.

Unfortunately, I get the following error

Error screenshot

The translaton (original partly in french):

"Error in saving the file. Failure to open the file "C:\Users\XXX\Documents\python_work\test.py" for writing: fopen() has failed: No such file or directory. The file on the disk may be truncated"

I've tried with the Python IDLE as well and get the same problem where I can't save my file.

I've read that it could be due to the fact that in WIN we use \ and in Unix / but I really don't know why Geany can't do alone the translation.

After few hours of hit and miss, does anyone could explain the reason of this behaviour ?

Edit1: Transcription and translation of the error


Solution

  • Found the problem.

    Make sure that the following is deactivated:

    Windows Defender > Virus & Threat protection > Virus & Threat protection settings option > Controlled folder access > Disabled