Forums

Permission denied: '/home/SWTLocResults' but I can't find said directory

Hi I'm new to pythonanywhere and programming in general and I just followed a YouTube tutorial on how to deploy Flask App on this platform.

I was able to see my web app load its content however, when I tried to test the Submit button I got the following error:

Exception on / [POST]

File "/usr/local/lib/python3.9/os.py", line 225, in makedirs mkdir(name, mode)

PermissionError: [Errno 13] Permission denied: '/home/SWTLocResults'

To my knowledge, I haven't created any SWTLocResults directory and when I tried to find it, I couldn't.

I'm hoping to get some insight from you guys, if you have any ideas or know a similar case to mine your help would be greatly appreciated.

Looks like you are using some code that has some paths hard coded.

Thanks @fjl, that gave me an idea and I was able to solve my problem.

Glad to hear that!