Instapy: File "quickstart.py", IndentationError: expected an indented block

Created on 6 May 2020  路  3Comments  路  Source: timgrossmann/InstaPy

Current Behavior

Captura de pantalla 2020-05-06 a las 1 45 56
Hi, I'm trying to run "quickstart.py" but it returns the following thing "IndentationError: expected an indented block".
I spent hours looking for a solution but nothing.

Here is what happens :
MacBook-Pro:InstaPy j*$ python3 quickstart.py
File "quickstart.py", line 18
session.set_comments(['What an amazing shot! :heart_eyes::wolf:',
^
IndentationError: expected an indented block

Even If I remove the set_comments command, it will return me an other random line error with the same message... help please .

InstaPy configuration

""" Quickstart script for InstaPy usage """

# imports
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace


# set workspace folder at desired location (default is at your home folder)
set_workspace(path=None)

# get an InstaPy session!
session = InstaPy(username='USERNAME', password='PASSWORD')

# let's go! :>
with smart_run(session):

session.set_comments(['What an amazing shot! :heart_eyes::wolf:',
        'Great capture!! :smiley: :thumbsup:',
        'Nice shot @{}  :wolf:',
        'I love your profile! :wolf: Grrrr',
        'Just incredible :open_mouth:',
        'Grrrr :wolf:',
        'I love your posts :wolf:',
        'Looks awesome @{}',
        'I can feel your passion @{} :muscle: :wolf:'], media='Photo') 

session.set_do_comment(enabled=True, percentage=22)
session.set_do_like(enabled=True, percentage=100)
session.set_delimit_liking(enabled=True, max=200, min=30)
session.set_delimit_commenting(enabled=True, max=12, min=3)
session.set_user_interact(amount=2, randomize=True, percentage=100, media='Photo')
session.like_by_tags(['gaytravel', 'gaywolf', 'gaymers'], amount=8, interact=True)
session.set_relationship_bounds(enabled=True,
                                    potency_ratio=None,
                                    delimit_by_numbers=True,
                                    max_followers=5000,
                                    max_following=1500,
                                    min_followers=100,
                                    min_following=50)

session.set_skip_users(skip_private=True, skip_no_profile_pic=True, skip_business=True,
session.story_by_tags(['menwolf', 'hairymen'])
session.grab_followers(username="USERNAME", amount="full", live_match=True, store_locally=True)
session.like_by_feed(amount=20, randomize=True, interact=True)                                  
session.set_quota_supervisor(enabled=True, sleep_after=["likes", "comments_d", "comments", "follows", "unfollows", "server_calls_h"], sleepyhead=True, stochastic_flow=True, notify_me=True,
                              peak_likes_hourly=50,
                              peak_likes_daily=400,
                               peak_comments_hourly=14,
                               peak_comments_daily=182,
                                peak_follows_hourly=None,
                                peak_follows_daily=None,
                                 peak_unfollows_hourly=None,
                                 peak_unfollows_daily=None,
                                  peak_server_calls_hourly=None,
                                  peak_server_calls_daily=4700)

session.set_action_delays(enabled=True,
                           like=46,
                           comment=70,
                           story=9
                           randomize=True, random_range_from=70, random_range_to=160)

Most helpful comment

@john29800 You had couple of open parentheses and missing commas but this should wok

""" Quickstart script for InstaPy usage """

# imports
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace


# set workspace folder at desired location (default is at your home folder)
set_workspace(path=None)

# get an InstaPy session!
session = InstaPy(username='username', password='password')

# let's go! :>
with smart_run(session):

    session.set_comments(['What an amazing shot! :heart_eyes::wolf:',
        'Great capture!! :smiley: :thumbsup:',
        'Nice shot @{}  :wolf:',
        'I love your profile! :wolf: Grrrr',
        'Just incredible :open_mouth:',
        'Grrrr :wolf:',
        'I love your posts :wolf:',
        'Looks awesome @{}',
        'I can feel your passion @{} :muscle: :wolf:'], media='Photo') 

    session.set_do_comment(enabled=True, percentage=22)
    session.set_do_like(enabled=True, percentage=100)
    session.set_delimit_liking(enabled=True, max=200, min=30)
    session.set_delimit_commenting(enabled=True, max=12, min=3)
    session.set_user_interact(amount=2, randomize=True, percentage=100, media='Photo')
    session.like_by_tags(['gaytravel', 'gaywolf', 'gaymers'], amount=8, interact=True)
    session.set_relationship_bounds(enabled=True,
                                    potency_ratio=None,
                                    delimit_by_numbers=True,
                                    max_followers=5000,
                                    max_following=1500,
                                    min_followers=100,
                                    min_following=50)

    session.set_skip_users(skip_private=True, skip_no_profile_pic=True, skip_business=True)
    session.story_by_tags(['gaywolf', 'Gayhairy'])
    session.grab_followers(username="username", amount="full", live_match=True, store_locally=True)
    session.like_by_feed(amount=20, randomize=True, interact=True)
    session.set_quota_supervisor(enabled=True, sleep_after=["likes", "comments_d", "comments", "follows", "unfollows", "server_calls_h"], sleepyhead=True, stochastic_flow=True, notify_me=True,
                              peak_likes_hourly=50,
                              peak_likes_daily=400,
                               peak_comments_hourly=14,
                               peak_comments_daily=182,
                                peak_follows_hourly=None,
                                peak_follows_daily=None,
                                 peak_unfollows_hourly=None,
                                 peak_unfollows_daily=None,
                                  peak_server_calls_hourly=None,
                                  peak_server_calls_daily=4700)

    session.set_action_delays(enabled=True,
                           like=46,
                           comment=70,
                           story=9,
                           randomize=True, random_range_from=70, random_range_to=160)

All 3 comments

Have you tried to search that error on google?
You need an editor that know python, that place spaces where need.
After with smart_run (session):
You need a space for every line that is inside block of smart_run !!

Yeah i did.
So, I put back yesterday the space for every line inside the block of smartrun...
But still having a similar issue... Tried with and without sudo... Help please.
Captura de pantalla 2020-05-08 a las 22 47 05

""" Quickstart script for InstaPy usage """

# imports
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace


# set workspace folder at desired location (default is at your home folder)
set_workspace(path=None)

# get an InstaPy session!
session = InstaPy(username='username', password='password')

# let's go! :>
with smart_run(session):

    session.set_comments(['What an amazing shot! :heart_eyes::wolf:',
        'Great capture!! :smiley: :thumbsup:',
        'Nice shot @{}  :wolf:',
        'I love your profile! :wolf: Grrrr',
        'Just incredible :open_mouth:',
        'Grrrr :wolf:',
        'I love your posts :wolf:',
        'Looks awesome @{}',
        'I can feel your passion @{} :muscle: :wolf:'], media='Photo') 

    session.set_do_comment(enabled=True, percentage=22)
    session.set_do_like(enabled=True, percentage=100)
    session.set_delimit_liking(enabled=True, max=200, min=30)
    session.set_delimit_commenting(enabled=True, max=12, min=3)
    session.set_user_interact(amount=2, randomize=True, percentage=100, media='Photo')
    session.like_by_tags(['gaytravel', 'gaywolf', 'gaymers'], amount=8, interact=True)
    session.set_relationship_bounds(enabled=True,
                                    potency_ratio=None,
                                    delimit_by_numbers=True,
                                    max_followers=5000,
                                    max_following=1500,
                                    min_followers=100,
                                    min_following=50)

    session.set_skip_users(skip_private=True, skip_no_profile_pic=True, skip_business=True,
    session.story_by_tags(['gaywolf', 'Gayhairy'])
    session.grab_followers(username="username", amount="full", live_match=True, store_locally=True)
    session.like_by_feed(amount=20, randomize=True, interact=True)
    session.set_quota_supervisor(enabled=True, sleep_after=["likes", "comments_d", "comments", "follows", "unfollows", "server_calls_h"], sleepyhead=True, stochastic_flow=True, notify_me=True,
                              peak_likes_hourly=50,
                              peak_likes_daily=400,
                               peak_comments_hourly=14,
                               peak_comments_daily=182,
                                peak_follows_hourly=None,
                                peak_follows_daily=None,
                                 peak_unfollows_hourly=None,
                                 peak_unfollows_daily=None,
                                  peak_server_calls_hourly=None,
                                  peak_server_calls_daily=4700)

    session.set_action_delays(enabled=True,
                           like=46,
                           comment=70,
                           story=9
                           randomize=True, random_range_from=70, random_range_to=160)

@john29800 You had couple of open parentheses and missing commas but this should wok

""" Quickstart script for InstaPy usage """

# imports
from instapy import InstaPy
from instapy import smart_run
from instapy import set_workspace


# set workspace folder at desired location (default is at your home folder)
set_workspace(path=None)

# get an InstaPy session!
session = InstaPy(username='username', password='password')

# let's go! :>
with smart_run(session):

    session.set_comments(['What an amazing shot! :heart_eyes::wolf:',
        'Great capture!! :smiley: :thumbsup:',
        'Nice shot @{}  :wolf:',
        'I love your profile! :wolf: Grrrr',
        'Just incredible :open_mouth:',
        'Grrrr :wolf:',
        'I love your posts :wolf:',
        'Looks awesome @{}',
        'I can feel your passion @{} :muscle: :wolf:'], media='Photo') 

    session.set_do_comment(enabled=True, percentage=22)
    session.set_do_like(enabled=True, percentage=100)
    session.set_delimit_liking(enabled=True, max=200, min=30)
    session.set_delimit_commenting(enabled=True, max=12, min=3)
    session.set_user_interact(amount=2, randomize=True, percentage=100, media='Photo')
    session.like_by_tags(['gaytravel', 'gaywolf', 'gaymers'], amount=8, interact=True)
    session.set_relationship_bounds(enabled=True,
                                    potency_ratio=None,
                                    delimit_by_numbers=True,
                                    max_followers=5000,
                                    max_following=1500,
                                    min_followers=100,
                                    min_following=50)

    session.set_skip_users(skip_private=True, skip_no_profile_pic=True, skip_business=True)
    session.story_by_tags(['gaywolf', 'Gayhairy'])
    session.grab_followers(username="username", amount="full", live_match=True, store_locally=True)
    session.like_by_feed(amount=20, randomize=True, interact=True)
    session.set_quota_supervisor(enabled=True, sleep_after=["likes", "comments_d", "comments", "follows", "unfollows", "server_calls_h"], sleepyhead=True, stochastic_flow=True, notify_me=True,
                              peak_likes_hourly=50,
                              peak_likes_daily=400,
                               peak_comments_hourly=14,
                               peak_comments_daily=182,
                                peak_follows_hourly=None,
                                peak_follows_daily=None,
                                 peak_unfollows_hourly=None,
                                 peak_unfollows_daily=None,
                                  peak_server_calls_hourly=None,
                                  peak_server_calls_daily=4700)

    session.set_action_delays(enabled=True,
                           like=46,
                           comment=70,
                           story=9,
                           randomize=True, random_range_from=70, random_range_to=160)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

wyvers picture wyvers  路  3Comments

ghost picture ghost  路  3Comments

thisishotdog picture thisishotdog  路  3Comments

converge picture converge  路  3Comments

seuraltimez picture seuraltimez  路  3Comments