WenhaoDaiCN / Panda-Learning

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

新版本Linux端登录出错,貌似是chrome相关问题 #95

Open princelai opened 5 years ago

princelai commented 5 years ago

报错信息

./pandalearning

开启: 获取更新信息...
输入用户标记名:正在联网获取跟新信息...
熊猫学习唯一下载地址为 https://github.com/Alivon/Panda-Learning
程序版本为:v3.0 preview,
最新版本为: v3.0 preview 主要更新说明:some text
更新显示不会打断之前操作,请继续...
kevin
是否保存钉钉帐户密码,保存后可后免登陆学习(Y/N) Y
请输入正确的学习强国帐号(钉钉手机号):13800000000
请输入学习强国密码:*******
Traceback (most recent call last):
  File "pandalearning.py", line 179, in <module>
  File "pandalearning.py", line 22, in user_flag
  File "pdlearn/dingding.py", line 23, in dd_login_status
  File "pdlearn/mydriver.py", line 21, in __init__
  File "selenium/webdriver/chrome/webdriver.py", line 81, in __init__
  File "selenium/webdriver/remote/webdriver.py", line 157, in __init__
  File "selenium/webdriver/remote/webdriver.py", line 252, in start_session
  File "selenium/webdriver/remote/webdriver.py", line 321, in execute
  File "selenium/webdriver/remote/errorhandler.py", line 242, in check_response
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/sbin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 4.19.30-1-MANJARO x86_64)

[9867] Failed to execute script pandalearning

报错是chromium无响应,ChromeDriver认为程序崩溃所以退出了,但是我手动可以执行/usr/sbin/chromium

which chromium                                                                                                                           ✘ 
/usr/bin/chromium

ls -l /usr/sbin
lrwxrwxrwx 1 root root 3 Sep 30 15:25 /usr/sbin -> bin

ls -l /bin
lrwxrwxrwx 1 root root 7 Sep 30 15:25 /bin -> usr/bin

/usr/sbin是软连接,所以没问题

zyftank commented 5 years ago

不知道源码,搞不清程序设置的chrome路径和文件名。如果程序要求用的是chrome,你安装的是chromium,貌似程序跑不起来的。

WenhaoDaiCN commented 5 years ago

注意cheomedriver与Chrome版本对应

princelai commented 5 years ago

注意cheomedriver与Chrome版本对应

chromium --version Chromium 73.0.3683.86 Manjaro Linux

chromedriver --version ChromeDriver 73.0.3683.86

我是linux安装的chromium,driver也是程序自带的,配套版本一致,我认为可能是路径问题,请问之后会给出源码吗

WenhaoDaiCN commented 5 years ago

针对今天强国更新后,pandalearning已紧急修复!!! 请至github重新下载

Kevin Chen notifications@github.com 于2019年3月28日周四 上午10:17写道:

注意cheomedriver与Chrome版本对应

chromium --version Chromium 73.0.3683.86 Manjaro Linux

chromedriver --version ChromeDriver 73.0.3683.86

我是linux安装的chromium,driver也是程序自带的,配套版本一致,我认为可能是路径问题,请问之后会给出源码吗

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Alivon/Panda-Learning/issues/95#issuecomment-477418123, or mute the thread https://github.com/notifications/unsubscribe-auth/AY5HcDkEy8QhRWDa84VDDFuy6YjV1zIgks5vbCYmgaJpZM4cM35_ .

princelai commented 5 years ago

再次反馈一下,我下载打包好的bin文件运行是会报错的,下载源码运行就能正常,不知道是不是打包的问题

ljkk commented 5 years ago

我也遇到同样的问题了, 你解决了吗

princelai commented 5 years ago

我也遇到同样的问题了, 你解决了吗

解决了,解决方法就是不用打包好的bin文件,直接用源码执行就可以