无法使用Python启动Tor,Selenium:Tor无法启动

2024-09-27 21:33:37 发布

您现在位置:Python中文网/ 问答频道 /正文

程序应使用selenium打开Tor,但当我启动它时,它有一个错误:

Traceback (most recent call last):
  File "c:/Users/Seya Fässler/Desktop/Python/test4.py", line 11, in <module>
    driver = webdriver.Firefox(firefox_binary=binary, executable_path=r'C:/Users/Seya Fässler/Webdrivers/geckodriver.exe')
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Zugriff verweigert (os error 5)


(base) C:\Users\Seya Fässler\Desktop\Python>C:/ProgramData/Anaconda3/python.exe "c:/Users/Seya Fässler/Desktop/Python/test4.py"
Traceback (most recent call last):
  File "c:/Users/Seya Fässler/Desktop/Python/test4.py", line 11, in <module>
    driver = webdriver.Firefox(firefox_binary=binary, executable_path=r'C:/Users/Seya Fässler/Webdrivers/geckodriver.exe')
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__        
    RemoteWebDriver.__init__(
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Access Denied (os error 5)

程序启动Tor,但显示:Tor无法启动。 我将Windows10与Python 3.8.3一起使用。对于这个新手问题,我很抱歉,我是stackoverflow的新手


Tags: inpyremoteresponselibpackagesseleniumline

热门问题