Are you running your script from an iCloud or external folder perhaps? That is a common problem , that there are a few threads about. IIRC if you want to run from iCloud, you need to create a sub folder.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.