Selenium Error - platform_sensor_reader_win.cc(242)]

Viewed 1312

enter image description hereI have been having issues with my selenium and chromedriver that I can't seem to figure out. I have one code that runs just fine and does everything it is supposed to. However, I have another that give me the error code in the picture. If anyone could help, I would certainly appreciate it as I had no luck finding anything online. I especially don't understand why one program runs with no issues and the other doesn't.

Code that runs just fine:

from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys
import time

beginningTime = time.time()
browser = webdriver.Chrome()
time.sleep(3)

browser.get('http://droughtmonitor.unl.edu/Data/DataDownload/ComprehensiveStatistics.aspx')
browser.maximize_window()
dropdown = browser.find_element_by_xpath("""//*[@id="dnn_ctr1009_USDMservice_CompStats_2017_aoiType_chosen"]""")

Code that doesn't work:

import numpy as np
from bs4 import BeautifulSoup
import requests
import pandas as pd
import time
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.keys import Keys


beginningTime = time.time()
browser = webdriver.Chrome()
symbols = ['WYNN', 'FL', 'TTWO', 'NKE']
myColumnHeaders = ['Date', 'Open', 'High', 'Low', 'Close', 'Volume']

dfs = []

for c in range(len(symbols)):
    browser.get('https://www.nasdaq.com/symbol/'+symbols[c]+'/historical')
    print('read url')
    time.sleep(3)
    browser.get(url)
    time.sleep(3)
    print('here')

It prints 'read url' and opens the webpage but never gets to the print 'here' step. It then throws the note in the command prompt that is attached as a picture. Any help would be greatly appreciated.enter image description here

1 Answers
options.add_argument('--log-level=3')
browser = webdriver.Chrome(executable_path=r'c:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe',
                              chrome_options=options)
Related