简体   繁体   中英

Selenium log errors Python 3.7

Hi I'am making a python 3.7 web scraper in windows 7, for my client. I use Selenium automates browsers, but there is a problem that when I start the script on my pc It works but when he run my script, the script has a lot of log errors like: "Can only enable virtual time for pages, not workers" and "LatencyInfo vector size 101 is too big". We have the same python version so isn't a compitibility problem, i looked for in internet but i found nothing

def FisrtRound(self):
    try:
        self.match = self.driver.find_element_by_xpath('//*/div[2]/div[2]/div[1]/h3/a')
        self.match = self.match.text

        self.nickname = self.driver.find_element_by_xpath('//*/div[2]/div[1]/div[1]/a')
        self.nickname = self.nickname.text

        self.sportInfo = self.driver.find_element_by_xpath('//*/div[2]/div[2]/div[1]/div[3]/small')
        self.sportInfo = self.sportInfo.text

        self.logo = self.driver.find_element_by_xpath('//*/div[2]/div[2]/div[1]/div[2]')
        self.logo = self.logo.text

        self.pick = self.driver.find_element_by_xpath('//*/div[2]/div[2]/div[1]/div[1]/span')
        self.pick = self.pick.text

        self.pickInfo = self.driver.find_element_by_class_name("pick-line")
        self.pickInfo = self.pickInfo.text

    except Exception as e:
        time.sleep(0)

def Update(self):
    try:
        time.sleep(3)
        self.match = self.driver.find_elements_by_xpath("//*/div[2]/div[2]/div[1]/h3/a")
        for i in range(0, len(self.match)):
            self.match[i] = self.match[i].text

        self.nickname = self.driver.find_elements_by_xpath('//*/div[2]/div[1]/div[1]/a')
        for i in range(0, len(self.nickname)):
            self.nickname[i] = self.nickname[i].text

        self.sportInfo = self.driver.find_elements_by_xpath('//*/div[2]/div[2]/div[1]/div[3]/small')
        for i in range(0, len(self.sportInfo)):
            self.sportInfo[i] = self.sportInfo[i].text

        self.logo = self.driver.find_elements_by_xpath('//*/div[2]/div[2]/div[1]/div[2]')
        for i in range(0, len(self.logo)):
            self.logo[i] = self.logo[i].text

        self.pick = self.driver.find_elements_by_xpath('//*/div[2]/div[2]/div[1]/div[1]/span')
        for i in range(0, len(self.pick)):
            self.pick[i] = self.pick[i].text

        self.pickInfo = self.driver.find_elements_by_class_name("pick-line")
        for i in range(0, len(self.pickInfo)):
            self.pickInfo[i] = self.pickInfo[i].text

I suspect that is a problem in either you web driver or computer configuration. Try running in in Firefox instead to confirm if it is the web driver. If so you might want to try running older versions of the driver since the newer ones might just not support something in your Windows 7 setup considering its age.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM