我的python脚本位于左上角,错误消息在中间,当我在左下角逐行执行时,右半部分是geckodriver日志。
我m trying to run python script using selenium module to make basic automated youtube search. I get the error show in the middle picture when I write the script as a whole but when I write the code line-by-line it works perfectly . I tried reinstalling gecko and firefox but didn不工作。我如何安装gecko: 1)un文件2)使文件可执行3)mv文件到usr/local/bin .26.0.0 Firefox 75.0 ubuntu 19.10 vim 8.2
发布于 2020-04-23 00:53:27
日志对错误非常清楚,您不能以root的形式运行 geckodriver,您必须在另一个用户下运行它,您可以使用sudo -H -u来执行该操作,即:
chown someuser:someuser /path/to/script.py
sudo -H -u someuser python /path/to/script.pyhttps://stackoverflow.com/questions/61374174
复制相似问题