首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法启动InstaPy

无法启动InstaPy
EN

Stack Overflow用户
提问于 2020-09-16 15:18:29
回答 1查看 276关注 0票数 0

嘿,大家好,我正在尝试编写一个instabot,刚刚开始,但是从一开始我就不能让它工作,每次我尝试运行我的快速入门时,它都会给我这个错误:

代码语言:javascript
复制
InstaPy Version: 0.6.10
 ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.
Workspace in use: "C:/Users/Floris/InstaPy"
Traceback (most recent call last):
  File "c:/Users/Floris/Desktop/instabot/quickstart.py", line 12, in <module>
    session = InstaPy(username=insta_username,
  File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\instapy\instapy.py", line 312, in __init__
    self.browser, err_msg = set_selenium_local_session(
  File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\instapy\browser.py", line 121, in set_selenium_local_session
    browser = webdriver.Firefox(
  File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Floris\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response        
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities

我安装了InstaPy从快速入门运行安装和更新这里是我的代码

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

insta_username = ''
insta_password = ''


# get an InstaPy session!
session = InstaPy(username=insta_username,
                  password=insta_password,
                  headless_browser=False)

with smart_run(session):
    # activity
    session.like_by_tags(["natgeo"], amount=10)

它并没有那么高级,因为我只是想让它启动

我希望你能帮助我

EN

回答 1

Stack Overflow用户

发布于 2020-09-29 19:05:33

如果你还没有火狐和geckodriver,你应该安装them....that,如果你已经有geckodriver,试着在InstaPy中添加geckodriver_path参数。

代码语言:javascript
复制
 session = InstaPy(username="Your username", password="your password", geckodriver_path= r"C:\Users\REPLACE\REPLACE\REPLACE\geckodriver.exe")
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63914997

复制
相关文章

相似问题

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