PermissionError: [Errno 13] Permission denied - by running a python script

最后都变了- 提交于 2019-12-25 00:28:59

问题


After the installation of my new react env i'm facing multiple problem with my shell. My python env is activated as always but if i run my script i get a permission denied to the file the script is looking for.

i've tried conda update brew update etc. but there is one special thing i was wondering about. before i'got my machine name displayed in shell now i only the env. ((base)~$)

Opening excel file...
Traceback (most recent call last):
  File "/Users/Dominik/OneDrive/OneDrive - Celona Gastro GmbH/ControllingDocs/BWAReader/BWAReader.py", line 145, in <module>
    wb = openpyxl.load_workbook (path)
  File "/Users/Dominik/anaconda3/lib/python3.7/site-packages/openpyxl/reader/excel.py", line 311, in load_workbook
    data_only, keep_links)
  File "/Users/Dominik/anaconda3/lib/python3.7/site-packages/openpyxl/reader/excel.py", line 126, in __init__
    self.archive = _validate_archive(fn)
  File "/Users/Dominik/anaconda3/lib/python3.7/site-packages/openpyxl/reader/excel.py", line 98, in _validate_archive
    archive = ZipFile(filename, 'r')
  File "/Users/Dominik/anaconda3/lib/python3.7/zipfile.py", line 1204, in __init__
    self.fp = io.open(file, filemode)
PermissionError: [Errno 13] Permission denied: '/Users/Dominik/OneDrive/OneDrive - Celona Gastro GmbH/BWAReader/BWA Zusammenfassung 2019-04.xlsx'
(base) BWAReader $ ```

How can i fix this?

来源:https://stackoverflow.com/questions/56337540/permissionerror-errno-13-permission-denied-by-running-a-python-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!