-1

I'm no coder, this is my first attempt to coding something.

I followed some instruction on YouTube to create an automation using Python and InstaPy.

The code of the .py file is the following

from instapy import InstaPy

from instapy import smart_run

my_username = 'myuser'

my_password = 'mypassword'

session = InstaPy(username=my_username,

password=my_password,

headless_browser=True)

with smart_run(session):

`session.set_relationship_bounds(enable=True,`

delimit_by_numbers=True,

max_followers=600,

min_followers=30,

max_following=600)

`session.like_by_tags(['tag1', 'tag2', 'tag3', 'tag4'], amount=300)`

The headless_browser=True because I want to run multiple automatons for different accounts that I have.

At least, based on the tutorials, that's what I think is the correct way.

Using the Terminal, accessing the folder on the desktop where the file is located I run the command python3 test.py

I'm getting a huge error.

I already looked at some post on GtHub that refer to errors on mac

https://github.com/timgrossmann/InstaPy/issues/5672

and I've already followed the instruction there, but I still get this error:

InstaPy Version: 0.6.13

._. ._. ._. ._. ._. ._. ._. ._.

Workspace in use: "/Users/av/InstaPy"

Error, unable to determine correct filename for 64bit macos

Traceback (most recent call last):

File "/Users/av/Desktop/InstaAuto/test.py", line 7, in <module>

session = InstaPy(username=my_username,

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instapy/instapy.py", line 325, in __init__

self.browser, err_msg = set_selenium_local_session(

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instapy/browser.py", line 122, in set_selenium_local_session

driver_path = geckodriver_path or get_geckodriver()

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/instapy/browser.py", line 38, in get_geckodriver

sym_path = gdd.download_and_install()[1]

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/webdriverdownloader/webdriverdownloader.py", line 174, in download_and_install

filename_with_path = self.download(version,

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/webdriverdownloader/webdriverdownloader.py", line 129, in download

download_url = self.get_download_url(version, os_name=os_name, bitness=bitness)

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/webdriverdownloader/webdriverdownloader.py", line 324, in get_download_url

raise RuntimeError(info_message)

RuntimeError: Error, unable to determine correct filename for 64bit macos

AVs-MacBook-Pro:InstaAuto av$

Can someone help me understand what should I do?

Thank you so much for you time.

A V
  • 1
  • 1
  • 3
    Could you please format the code properly? It's lacking any indentation and that every second line is a blank line makes it hard to read. – mkrieger1 Jun 22 '21 at 17:46
  • Already answered here: https://stackoverflow.com/questions/63235553/instapy-error-unable-to-determine-correct-filename-for-64bit-linux – Raspberry PyCharm Jun 22 '21 at 17:47
  • Try installing geckodriver: `brew install geckodriver` – paoloaq Jun 22 '21 at 17:48
  • 2
    "I'm no coder, this is my first attempt to coding something." Then you should follow a tutorial *for the language itself* and learn the fundamentals, before trying to use a library for some special-purpose thing and typing in a bunch of code you don't understand. – Karl Knechtel Jun 22 '21 at 18:06

1 Answers1

0

Its a current issue on github right now. There are two versions of the gecko driver with the package.

Update line 320 in webdriverdownloader.py to:

filename = [name for name in filenames if os_name in name and name[-12:] == 'macos.tar.gz' ]
stefan_aus_hannover
  • 1,777
  • 12
  • 13