Errno 13和“可执行文件可能具有错误的权限” Mac Pycharm

时间:2018-07-18 18:05:27

标签: python macos selenium-webdriver pycharm

当我尝试运行python文件时,这是Pycharm中的错误代码:

usr/local/bin/python3.7 /Users/carolin/PycharmProjects/WSLider2/WSLider2.py
Traceback (most recent call last):
  File "/Users/carolin/Library/Python/3.7/lib/python/site-packages/selenium/webdriver/common/service.py", line 76, in start
    stdin=PIPE)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1499, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
**PermissionError: [Errno 13] Permission denied: '/Users/carolin/PycharmProjects/WSLider2**'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/carolin/PycharmProjects/WSLider2/WSLider2.py", line 12, in <module>
    browser21 = webdriver.Chrome(executable_path=rutaChromeDriver)
  File "/Users/carolin/Library/Python/3.7/lib/python/site-packages/selenium/webdriver/chrome/webdriver.py", line 68, in __init__
    self.service.start()
  File "/Users/carolin/Library/Python/3.7/lib/python/site-packages/selenium/webdriver/common/service.py", line 88, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'WSLider2' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

Process finished with exit code 1

我有一个带有Pycharm Comunity 1.8的Mac Sierra,一个带有Anaconda发行版的Python 3.7

我尝试修改相关文件夹的权限,但没有帮助。

是什么原因导致此错误,我该如何纠正?

感谢和问候。

0 个答案:

没有答案