InstaPy quickstart.py not working - Selenium issue

Viewed 1978

I have installed Python 3.8.2 and installed Instapy using the video tutorial and running the installation file and windows start file that comes with the Instapy-quickstart Package from github.

I also installed the latest version of Firefox.

When I run the windows_start.bat file says it doesn't find the quickstart.py file.

So I open the windows command line, go to the Instapy directory and run "python quickstart.py" and returns the following:

c:\development\python\instapy-quickstart>python quickstart.py
InstaPy Version: 0.6.8
 ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.
Workspace in use: "C:/Users/KWAN/InstaPy"
Traceback (most recent call last):
  File "quickstart.py", line 25, in <module>
    session = InstaPy(username=insta_username,
  File "C:\Program Files (x86)\Python38-32\lib\site-packages\instapy\instapy.py", line 309, in __init__
    self.browser, err_msg = set_selenium_local_session(
  File "C:\Program Files (x86)\Python38-32\lib\site-packages\instapy\browser.py", line 111, in set_selenium_local_session
    browser = webdriver.Firefox(
  File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Program Files (x86)\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: Unable to find a matching set of capabilities

My quickstart.py file is this (username and password removed for obvious reasons):

# imports
from instapy import InstaPy
from instapy import smart_run


# login credentials
insta_username = ''
insta_password = '
driver_path = 'C:/Users/KWAN/InstaPy/assets/geckodriver.exe'

comments = ['Nice shot! @{}',
        'I love your profile! @{}',
        'Your feed is an inspiration :thumbsup:',
        'Just incredible :open_mouth:',
        'What camera did you use @{}?',
        'Love your posts @{}',
        'Looks awesome @{}',
        'Getting inspired by you @{}',
        ':raised_hands: Yes!',
        'I can feel your passion @{} :muscle:']

# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background

session = InstaPy(username=insta_username,
                  password=insta_password,
                  headless_browser=True,
                  geckodriver_path=driver_path)

with smart_run(session):
  """ Activity flow """     
  # general settings        
  session.set_dont_include(["friend1", "friend2", "friend3"])       

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

  # Joining Engagement Pods
  session.set_do_comment(enabled=True, percentage=35)
  session.set_comments(comments)
  session.join_pods(topic='sports', engagement_mode='no_comments')

I searched for a possible solution online but I haven't found one that works yet. Any idea of how I can fix this?

Thanks

0 Answers
Related