I'm attempting to create a .txt file as the output from a larger python script I'm running within ArcMap. The code I'm having trouble goes like this:
x = open('adfd.txt', 'w'), and my error message says:
Traceback (most recent call last):
<string>", line 1, in
IOError: [Errno 13] Permission denied: 'adfd.txt'
I've tried this on ArcMap installations on other computers, as well as on non-Esri python interpreters on my own computer (Anaconda's Spyder), and it works fine there, so I'm pretty sure it's something going on with how my installation of ArcMap handles permissions. Does anyone know what might be going on here? I'd like to avoid reinstalling if possible, because that's a big pain with my student license.
Edit prompted by @AlexGIS: When I try to specify a different existing folder, I can change folders fine using arcpy.env.workspave, but I still get the same error message from the open command. When I try to make a new directory within ArcMap using os.mkdir I get a new error message:
os.mkdir('asdfadfa') Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> WindowsError: [Error 5] Access is denied: 'asdfadfa'
Maybe a new clue?