1

[SETUP: Windows 10 x64 PyCharm 2019.3.3 (Community Edition)]

I'm trying to create a simple Insta bot with InstaPy but I keep running into the same error

CODE:

from instapy import InstaPy

InstaPy(username='username', password='password').login()

I keep getting the following error:

Traceback (most recent call last):
  File "C:/Users/Niku/PycharmProjects/InstaBot/InstaBot.py", line 6, in <module>
    InstaPy(username='Rubixmusicprod', password='Niku2020').login()
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\instapy\instapy.py", line 309, in __init__
    self.browser, err_msg = set_selenium_local_session(
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\instapy\browser.py", line 111, in set_selenium_local_session
    browser = webdriver.Firefox(
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Niku\PycharmProjects\InstaBot\venv\lib\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

I've tried upgrading selenium, along with Geckodriver and related drivers. It was a mission just to get InstaPy installed! I may just have to go the browser automation way instead here.

Any help would be greatly appreciated!!

Manik
  • 573
  • 1
  • 9
  • 28
Karanvir.S.G
  • 70
  • 1
  • 11

1 Answers1

0

You must use Selenium with Geckodrive in Firefox

session = InstaPy(username=INSTAGRAM_LOGIN,
                  password=INSTAGRAM_PASSWORD,
                  geckodriver_path='geckodriver.exe')
  • Thanks! I found out that the InstaPy API isn't currently compatible with python 3.8, have to go back to previous version for functionality. – Karanvir.S.G Jun 18 '20 at 08:07