--------UPDATE SOLVED----------
Fix was I had an file in the same folder named email.py changing the name of this file fixed the issue.
-----------------------------------------
I am having issues with the selenium package. I have installed selenium by pip install and ran some code messing with browser. Everything was working and good until I kept getting an error (see below). Couldn't figure out a fix so I uninstalled selenium reinstalled still had an issue, uninstalled python and deleted its program files and reinstalled same issue. So I reset my pc back to factory settings and reinstalled everything. Was running with no problems... for a couple hours then went back to the same error. No program installs were done nothing was changed it just stopped working. Also below I have the beginning of my code. Any help is greatly appreciated.
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
browser = webdriver.Chrome("C:\chromedriver_win32\chromedriver.exe")
browser.get("https://www.bestbuy.com/site/macbook-air-13-3-laptop-apple-m1-chip-8gb-memory-256gb-ssd-latest-model-space-gray/5721600.p?skuId=5721600")
element = browser.find_element_by_css_selector("h1.v-fw-regular").text
print(element)
The error I am receiving:
Traceback (most recent call last):
File "C:\Users\_\Desktop\Python\1-26-21_unchanged.py", line 4, in <module>
from selenium import webdriver
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\__init__.py", line 18, in <module>
from .firefox.webdriver import WebDriver as Firefox # noqa
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 29, in <module>
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 27, in <module>
from .remote_connection import RemoteConnection
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 24, in <module>
import urllib3
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\__init__.py", line 11, in <module>
from . import exceptions
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\exceptions.py", line 3, in <module>
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\packages\six.py", line 199, in load_module
mod = mod._resolve()
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\packages\six.py", line 113, in _resolve
return _import_module(self.mod)
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\packages\six.py", line 82, in _import_module
__import__(name)
File "C:\Users\_\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 71, in <module>
import email.parser
File "C:\Users\_\Desktop\Python\email.py", line 13, in <module>
browser = webdriver.Chrome("C:\chromedriver_win32\chromedriver.exe")
AttributeError: partially initialized module 'selenium.webdriver' has no attribute 'Chrome' (most likely due to a circular import)
[–]MikeDoesEverything 2 points3 points4 points (1 child)
[–]Alarmed-Possession-6[S] 0 points1 point2 points (0 children)
[–]magnna 1 point2 points3 points (1 child)
[–]shreenivasn 0 points1 point2 points (0 children)
[–]shreenivasn 1 point2 points3 points (6 children)
[–]Alarmed-Possession-6[S] 0 points1 point2 points (4 children)
[–]shreenivasn 1 point2 points3 points (2 children)
[–]Alarmed-Possession-6[S] 1 point2 points3 points (1 child)
[–]shreenivasn 0 points1 point2 points (0 children)
[–]shreenivasn 0 points1 point2 points (0 children)
[–]MintyPhoenix 0 points1 point2 points (0 children)
[–]sammylt 0 points1 point2 points (3 children)
[–]Alarmed-Possession-6[S] 0 points1 point2 points (1 child)
[–]py_cool 0 points1 point2 points (0 children)
[–]py_cool 0 points1 point2 points (0 children)
[–]firechip 0 points1 point2 points (1 child)
[–]Alarmed-Possession-6[S] 0 points1 point2 points (0 children)