0

Please help :)

I just want to load a csv file so I wrote:

import os.path
print(os.path.abspath("example.csv"))

in the pythonista, I got the file path without error however, in the pyto, it returned with PermissionError [Errno1] Operation not permitted

The file is located on my laptop where I've already connected via smb address

Steven
  • 1,733
  • 2
  • 16
  • 30
Finn Dong
  • 1
  • 2
  • FYI:Traceback (most recent call last): File "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/ZlgbEwTraining/Python/testscript.py", line 3, in print(os.path.abspath("example1.txt")) File "Library/python38/posixpath.py", line 379, in abspath cwd = os.getcwd() PermissionError: [Errno 1] Operation not permitted >>> – Finn Dong Jul 02 '20 at 03:57

1 Answers1

0

Just figured it out. It turns out that Pyto need to confirm the scripts directory before exciting it.

I pressed the Settings icon at bottom, and pressed “Current Directory” to select the directory where the script located. After these steps I was able to run the codes above without errors.

Thank you!

Finn Dong
  • 1
  • 2