Python中文
首页
教程
问答
标签
搜索
登录
注册
IOError:[Errno 13]权限被拒绝:'壁虎.log运行Python/Selenium时
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>通过Flask/Python运行Selenium时收到以下错误</p> <pre><code>browser = webdriver.Firefox() [Wed Mar 07 03:02:27.719608 2018] [:error] [pid 21555] [client 108.162.250.6:36139] File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 151, in __init__ [Wed Mar 07 03:02:27.719611 2018] [:error] [pid 21555] [client 108.162.250.6:36139] log_path=log_path) [Wed Mar 07 03:02:27.719614 2018] [:error] [pid 21555] [client 108.162.250.6:36139] File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/service.py", line 44, in __init__ [Wed Mar 07 03:02:27.719617 2018] [:error] [pid 21555] [client 108.162.250.6:36139] log_file = open(log_path, "a+") if log_path is not None and log_path != "" else None [Wed Mar 07 03:02:27.719620 2018] [:error] [pid 21555] [client 108.162.250.6:36139] IOError: [Errno 13] Permission denied: 'geckodriver.log' </code></pre> <p>功能是</p> ^{pr2}$ <p>如果我直接转到应用程序目录并运行脚本(<code>python run.py</code>),那么我不会得到错误。在</p> <p>基于此,通过Flask运行日志文件似乎是不可写的,但是文件应该放在哪里呢?在</p> <p><code>geckdriver</code>可执行文件安装在<code>/usr/local/bin/</code></p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>我在一台windows 10电脑上。 当我删除我的壁虎.log归档解决了我的问题。在</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
如何加速Python字符串匹配cod
5 回答
如何加速python嵌套循环?
2 回答
如何加速python循环
4 回答
如何加速python循环?
6 回答
如何加速Python执行?
7 回答
如何加速python数据帧中的嵌套循环?
1 回答
如何加速python曲线拟合二维数组?
2 回答
如何加速python的“turtle”功能,并在最后阻止它冻结
3 回答
如何加速python的启动和/或在加载库时减少文件搜索?
5 回答
如何加速python的执行
3 回答
如何加速python网络?
8 回答
如何加速python脚本并减少内存消耗?
6 回答
如何加速Python脚本迭代嵌套循环?
9 回答
如何加速Python请求
7 回答
如何加速Pywikibot?
4 回答
如何加速scipy.integrate.quad?
2 回答
如何加速scipy.ndimage.geometric_transform?
2 回答
如何加速scipy插值?
9 回答
如何加速SFTP传输?
3 回答
如何加速sklearn SVR?
7 回答