Python 3.x I';我正在尝试使用selenium,使用TOR:错误

Python 3.x I';我正在尝试使用selenium,使用TOR:错误,python-3.x,Python 3.x,我使用此代码打开TOR browser选项卡,但出现以下错误(请参见下文) 遵循我的代码。有人知道我哪里做错了吗。我使用Windows10 from selenium import webdriver from selenium.webdriver.firefox.firefox_profile import FirefoxProfile import os torexe = os.popen(r'C:\\Users\\cielh\\Tor Browser\\Browser\\firefox

我使用此代码打开TOR browser选项卡,但出现以下错误(请参见下文)

遵循我的代码。有人知道我哪里做错了吗。我使用Windows10

from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
import os


torexe = os.popen(r'C:\\Users\\cielh\\Tor Browser\\Browser\\firefox.exe')
PROXY = "socks5://localhost:9050" # IP:PORT or HOST:PORT
options = webdriver.ChromeOptions()
options.add_argument('--proxy-server=%s' % PROXY)
driver = webdriver.Firefox(firefox_profile=options, executable_path=r'C:\\Users\\cielh\\OneDrive\\Área de Trabalho\\Nimo\\operadrivers\\geckodriver.exe')
driver.get("http://check.torproject.org")
产生我的错误如下(我已经尝试了所有的方法,但没有成功!)