WenhaoDaiCN / Panda-Learning

已终止该项目
GNU Lesser General Public License v3.0
1.94k stars 644 forks source link

Chrome 74 Mydriver初始化失败 #286

Open Alion548 opened 5 years ago

Alion548 commented 5 years ago
/usr/local/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.1) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
开启: 获取更新信息...

正在联网获取更新信息...
读取用户信息成功
熊猫学习唯一下载地址为 https://github.com/Alivon/Panda-Learning
程序版本为:v2.5,
最新版本为:v2.5
========================================================================================================================
========================================================================================================================
更新显示不会打断之前输入等操作,请继续......(若已输入用户标记直接enter)
========================================================================================================================
Mydriver初始化失败
========================================================================================================================
Traceback (most recent call last):
  File "pandalearning.py", line 180, in <module>
    cookies, a_log, v_log = user_flag(dd_status, uname)
  File "pandalearning.py", line 15, in user_flag
    cookies = dingding.dd_login_status(uname, has_dd=True)
  File "/root/panda-learning/pdlearn/dingding.py", line 23, in dd_login_status
    driver_login = mydriver.Mydriver(noimg=False)
  File "/root/panda-learning/pdlearn/mydriver.py", line 42, in __init__
    chrome_options=self.options)
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome version must be between 70 and 73
  (Driver info: chromedriver=73.0.3683.86,platform=Linux 5.0.7-200.fc29.x86_64 x86_64)
WenhaoDaiCN commented 5 years ago

Chrome version must be between 70 and 73 你的chrome版本必须与chromedriver匹配

Alion548 commented 5 years ago

应该是Fedora30 软件源 ChromeDriver 还没有收录更新,解决方法:

下载 http://chromedriver.chromium.org/downloads 最新版本,替换/bin 文件
Alion548 commented 5 years ago

Chrome version must be between 70 and 73 你的chrome版本必须与chromedriver匹配

更新ChromeDrive后,可以正常运行,不过有一行异常

/usr/local/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.1) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
开启: 获取更新信息...
kalasusen commented 5 years ago

应该是Fedora30软件源ChromeDriver还没有收录更新,解决方法:

下载http://chromedriver.chromium.org/downloads最新版本,替换/ bin文件

正解,下载对应版本chromedriver放入/bin文件夹即可