Я пытался открыть Google через selenium
, но я получил эту ошибку. Может кто-нибудь объяснить?
from selenium import webdriver
driver = webdriver.Chrome("C:\\Users\\Dimitar\\Desktop\\chromedriver.exe")
driver.get ("https://www.facebook.com")
Traceback (most recent call last):
File "C:/Users/Dimitar/PycharmProjects/helloworld/new.py", line 1, in <module>
from selenium import webdriver
File "C:\Users\Dimitar\PycharmProjects\helloworld\venv\lib\site-packages\selenium\webdriver\__init__.py", line 18, in <module>
from .firefox.webdriver import WebDriver as Firefox # noqa
File "C:\Users\Dimitar\PycharmProjects\helloworld\venv\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 29, in <module>
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
File "C:\Users\Dimitar\PycharmProjects\helloworld\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 27, in <module>
from .remote_connection import RemoteConnection
File "C:\Users\Dimitar\PycharmProjects\helloworld\venv\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 24, in <module>
import urllib3
File "C:\Users\Dimitar\PycharmProjects\helloworld\venv\lib\site-packages\urllib3\__init__.py", line 7, in <module>
from .connectionpool import (
File "C:\Users\Dimitar\PycharmProjects\helloworld\venv\lib\site-packages\urllib3\connectionpool.py", line 30, in <module>
from .connection import (
ImportError: cannot import name 'port_by_scheme' from 'urllib3.connection' (C:\Users\Dimitar\PycharmProjects\helloworld\venv\lib\site-packages\urllib3\connection.py)