首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Instapy问题,可能连接到firefox webdriver

Instapy问题,可能连接到firefox webdriver
EN

Stack Overflow用户
提问于 2021-04-03 00:38:23
回答 1查看 72关注 0票数 0

所以这是我的代码:

代码语言:javascript
复制
from instapy import InstaPy

session = InstaPy(username="<my_username>", password="<my_password>")
session.login()
session.like_by_tags(["bmw", "mercedes"], amount=5)

并返回一条错误消息:

代码语言:javascript
复制
InstaPy Version: 0.6.13
 ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._. 
Workspace in use: "C:/Users/budim/InstaPy"

  0%|          | 0/1407 [00:00<?, ?kb/s]
 28%|██▊       | 387/1407 [00:00<00:00, 3774.35kb/s]
 54%|█████▍    | 765/1407 [00:00<00:00, 3257.82kb/s]
 78%|███████▊  | 1095/1407 [00:00<00:00, 2863.47kb/s]
 99%|█████████▊| 1387/1407 [00:00<00:00, 2687.05kb/s]
1408kb [00:00, 2887.22kb/s]                          
Traceback (most recent call last):
  File "C:\Users\budim\Desktop\natjecanje iz inf\test.py", line 3, in <module>
    session = InstaPy(username="<my_username>", password="<my_password>")
  File "C:\Users\budim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instapy\instapy.py", line 325, in __init__
    self.browser, err_msg = set_selenium_local_session(
  File "C:\Users\budim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instapy\browser.py", line 123, in set_selenium_local_session
    browser = webdriver.Firefox(
  File "C:\Users\budim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "C:\Users\budim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\budim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\budim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\budim\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

[Finished in 6.2s]

我不明白为什么会发生这样的事情。如果有人能提供一些帮助,我将非常感激。

EN

回答 1

Stack Overflow用户

发布于 2021-10-31 07:09:54

问题不在于instapy,而在于firefox

代码语言:javascript
复制
selenium.common.exceptions.SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line 

GeckoDriver (firefox web驱动程序)无法在默认位置找到Firefox二进制文件。

expected-browser-binary-location-but-unable-to-find-binary-in-default-location

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66922454

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档