WenhaoDaiCN / Panda-Learning

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

debian armhf 上运行源码显示Mydriver初始化失败 #317

Open Freflow opened 5 years ago

Freflow commented 5 years ago

是否保存钉钉帐户密码,保存后可后免登陆学习(Y/N) y 请输入正确的学习强国帐号(钉钉手机号): 请输入学习强国密码:

Mydriver初始化失败

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 76, in start stdin=PIPE) File "/usr/lib/python3.5/subprocess.py", line 676, in init restore_signals, start_new_session) File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: './chromedriver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "pandalearning.py", line 180, in cookies, a_log, v_log = user_flag(dd_status, uname) File "pandalearning.py", line 21, in user_flag cookies = dingding.dd_login_status(uname) File "/home/freflow/pdlearn/dingding.py", line 23, in dd_login_status driver_login = mydriver.Mydriver(noimg=False) File "/home/freflow/pdlearn/mydriver.py", line 39, in init chrome_options=self.options) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in init self.service.start() File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 83, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

root@localhost:/home/freflow#

不管是debian还是Kali linux都是这个问题,请问怎么解决呢?

zyftank commented 5 years ago

No such file or directory: './chromedriver'

没有chrome驱动程序,或者程序找不到chromedriver

Freflow commented 5 years ago

No such file or directory: './chromedriver'

没有chrome驱动程序,或者程序找不到chromedriver

我把chromedriver放入/usr/bin/里了,设了777,用chromedriver -v 查看不存在,原本/usr/bin/里也有这个文件,而且chromedriver -v 会显示版本号,好像是73.几的,不过运行也是这样,是我哪里配置错了吗?chromium和chromium-driver都是直接apt-get install安装的。

zyftank commented 5 years ago

你是运行源码还是编译好的程序?如果是源码改下路径,你没看错误提示的路径不对吗?

Freflow commented 5 years ago

你是运行源码还是编译好的程序?如果是源码改下路径,你没看错误提示的路径不对吗?

运行的源码,就是用的python3 pandalearning.py ,是要改什么的路径呢?我只下载了pandalearning.py和pdlearn文件夹。

zyftank commented 5 years ago

find配合grep查找一下也能找出来。

DyingLight12 commented 5 years ago

我可以教你,我是arm64的