centos 7.2 下执行selenium+ Firefox 报错:Message: ‘geckodriver‘ executable needs to be in PATH.

问题:

突然发现服务器上的报错,

Message: 'geckodriver' executable needs to be in PATH.

之前的代码是使用selenium +Firefox,是没有问题的,今天就突然有问题了,手动使用python3 + 代码也是没有问题的,就是使用定时任务crontab执行时会报错。

解决方法–删除root下geckodriver.log

找了一上午都没有解决,最终,将root目前下的geckodriver.log 删除,然后在跑任务就可以了,具体为什么 我也不是太清楚,担心日后在遇到这种场景,记录下来吧。

猜你喜欢

转载自blog.csdn.net/weixin_42081389/article/details/107249621