Bruuuuuuce / PKUAutoSubmit

PKU一键出入校备案小工具
Apache License 2.0
176 stars 272 forks source link

Mac OS下出现疑似权限问题 #24

Closed Wistomize closed 3 years ago

Wistomize commented 3 years ago

报错信息:

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
    stdin=PIPE)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: './phantomjs/bin/phantomjs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 45, in <module>
    service_args=['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 56, in __init__
    self.service.start()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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: 'phantomjs' executable may have wrong permissions. 

sudo指令和直接在资源管理器改权限均无效,求指教

Wistomize commented 3 years ago

已经使用chmod解决……

Bruuuuuuce commented 3 years ago

没想到macos也会出现这个问题,一般这是Linux上的权限问题,可以尝试一下用chmod修改权限为777(-rwx-rwx-rwx)。 具体操作为进入phantomjs的目录,然后 $ chmod 777 phantomjs

发件人: Wistomize 发送时间: 2021年3月12日 0:16 收件人: Bruuuuuuce/PKUAutoSubmit 抄送: Subscribed 主题: [Bruuuuuuce/PKUAutoSubmit] Mac OS下出现疑似权限问题 (#24)

报错信息: Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start

stdin=PIPE)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 729, in init

restore_signals, start_new_session)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1364, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

PermissionError: [Errno 13] Permission denied: './phantomjs/bin/phantomjs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "main.py", line 45, in

service_args=['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 56, in init

self.service.start()

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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: 'phantomjs' executable may have wrong permissions.

sudo指令和直接在资源管理器改权限均无效,求指教 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.