[GH-ISSUE #196] Unable to run 3.3.2 'KeyError: 'follow_private_or_empty'' #620

Closed
opened 2026-03-13 22:10:51 +03:00 by kerem · 3 comments
Owner

Originally created by @adchsm on GitHub (Nov 23, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/196

After upgrading to 3.3.2 and updating the interact.json file with the new filters/features, I'm unable to run the bot. I use a scraper and run the bot on macOS/Android 11 (API 30), these devices have been working with previous versions of the bot all ok.

python3 start.py --config-file interact.json

##########################################################
#                                                        #
#   _____                                 _              #
#  |_   _|                               (_)             #
#    | |  _ __  ___  ___  _ __ ___  _ __  _  __ _  ___   #
#    | | | '_ \/ __|/ _ \| '_ ` _ \| '_ \| |/ _` |/ __|  #
#   _| |_| | | \__ \ (_) | | | | | | | | | | (_| | (__   #
#  |_____|_| |_|___/\___/|_| |_| |_|_| |_|_|\__,_|\___|  #
#                                                        #
##########################################################

Insomniac v3.3.2

[11/23 09:23:50] Your activation code is confirmed, welcome!
Connected devices via adb: 1. That's ok.
[11/23 09:23:51] Using uiautomator v2
[11/23 09:23:51] Instagram version: 167.0.0.24.120
[11/23 09:23:51] Sleep time (min) before repeat: 65
[11/23 09:23:51] Running Insomniac with the "interact_targets" action.
[11/23 09:23:51] Interactions count: 1
[11/23 09:23:51] Total likes limit: 0
[11/23 09:23:51] Total interactions limit: 10
[11/23 09:23:51] Total follow limit: 11
Traceback (most recent call last):
  File "start.py", line 4, in <module>
    insomniac.run(activation_code)
  File "/Library/Python/3.8/site-packages/insomniac/__init__.py", line 20, in run
    insomniac_session.run()
  File "<string>", line 68, in run
  File "<string>", line 47, in set_filters
KeyError: 'follow_private_or_empty'

Here's my start.py file:

import insomniac

activation_code = "REDACTED"
insomniac.run(activation_code)

And here is my interact.json file:

[
    {
        "parameter-name": "repeat",
        "enabled": true,
        "value": "50-70",
        "description": "repeat the same session again after N minutes after completion, disabled by default. It can be a number of minutes (e.g. 180) or a range (e.g. 120-180)"
    },
    {
        "parameter-name": "likes_count",
        "enabled": true,
        "value": "0",
        "description": "number of likes for each interacted user, 2 by default. It can be a number (e.g. 2) or a range (e.g. 2-4)"
    },
    {
        "parameter-name": "follow_percentage",
        "enabled": true,
        "value": "100",
        "description": "follow given percentage of interacted users, 0 by default"
    },
    {
        "parameter-name": "interact",
        "enabled": false,
        "value": [],
        "description": "list of hashtags and usernames. Usernames should start with \\\"@\\\" symbol. The script will interact with hashtags\\' posts likers and with users\\' followers"
    },
    {
        "parameter-name": "interact_targets",
        "enabled": true,
        "value": "True",
        "description": "use this argument in order to interact with profiles from targets.txt"
    },
    {
        "parameter-name": "total_likes_limit",
        "enabled": true,
        "value": "0",
        "description": "limit on total amount of likes during the session, 300 by default. It can be a number presenting specific limit (e.g. 300) or a range (e.g. 100-120)"
    },
    {
        "parameter-name": "total_interactions_limit",
        "enabled": true,
        "value": "9-11",
        "description": "number of total interactions per session, disabled by default. It can be a number (e.g. 70) or a range (e.g. 60-80). Only successful interactions count"
    },
    {
        "parameter-name": "total_follow_limit",
        "enabled": true,
        "value": "9-11",
        "description": "limit on total amount of follows during the session, disabled by default. It can be a number (e.g. 27) or a range (e.g. 20-30)"
    },
    {
        "parameter-name": "interactions_count",
        "enabled": true,
        "value": "1",
        "description": "number of interactions per each blogger/hashtag, 70 by default. It can be a number (e.g. 70) or a range (e.g. 60-80). Only successful interactions count"
    },
    {
        "parameter-name": "follow_limit",
        "enabled": false,
        "value": "1-3",
        "description": "limit on amount of follows during interaction with each one user's followers, disabled by default. It can be a number (e.g. 10) or a range (e.g. 6-9)"
    },
    {
        "parameter-name": "filters",
        "enabled": true,
        "value": {
            "skip_business": true,
            "skip_non_business": false,
            "min_followers": 25,
            "max_followers": 100000,
            "min_followings": 10,
            "max_followings": 10000,
            "min_potency_ratio": 0.45,
            "min_posts": 7,
            "max_digits_in_profile_name": 4,
            "follow_private_or_empty": "private_and_public",
            "skip_profiles_without_stories": false,
            "blacklist_words": [],
            "mandatory_words": [],
            "specific_alphabet": []
        },
        "description": "add this argument if you want to pass filters as an argument and not from filters.json file"
    }
]

It seems to be having issues with the KeyError: 'follow_private_or_empty' filter, but not sure how or why as I've updated the filter to the new syntax. Any help would be really appreciated, thank you.

Originally created by @adchsm on GitHub (Nov 23, 2020). Original GitHub issue: https://github.com/alexal1/Insomniac/issues/196 After upgrading to 3.3.2 and updating the interact.json file with the new filters/features, I'm unable to run the bot. I use a scraper and run the bot on macOS/Android 11 (API 30), these devices have been working with previous versions of the bot all ok. `python3 start.py --config-file interact.json` ``` ########################################################## # # # _____ _ # # |_ _| (_) # # | | _ __ ___ ___ _ __ ___ _ __ _ __ _ ___ # # | | | '_ \/ __|/ _ \| '_ ` _ \| '_ \| |/ _` |/ __| # # _| |_| | | \__ \ (_) | | | | | | | | | | (_| | (__ # # |_____|_| |_|___/\___/|_| |_| |_|_| |_|_|\__,_|\___| # # # ########################################################## Insomniac v3.3.2 [11/23 09:23:50] Your activation code is confirmed, welcome! Connected devices via adb: 1. That's ok. [11/23 09:23:51] Using uiautomator v2 [11/23 09:23:51] Instagram version: 167.0.0.24.120 [11/23 09:23:51] Sleep time (min) before repeat: 65 [11/23 09:23:51] Running Insomniac with the "interact_targets" action. [11/23 09:23:51] Interactions count: 1 [11/23 09:23:51] Total likes limit: 0 [11/23 09:23:51] Total interactions limit: 10 [11/23 09:23:51] Total follow limit: 11 Traceback (most recent call last): File "start.py", line 4, in <module> insomniac.run(activation_code) File "/Library/Python/3.8/site-packages/insomniac/__init__.py", line 20, in run insomniac_session.run() File "<string>", line 68, in run File "<string>", line 47, in set_filters KeyError: 'follow_private_or_empty' ``` Here's my start.py file: ``` import insomniac activation_code = "REDACTED" insomniac.run(activation_code) ``` And here is my `interact.json` file: ``` [ { "parameter-name": "repeat", "enabled": true, "value": "50-70", "description": "repeat the same session again after N minutes after completion, disabled by default. It can be a number of minutes (e.g. 180) or a range (e.g. 120-180)" }, { "parameter-name": "likes_count", "enabled": true, "value": "0", "description": "number of likes for each interacted user, 2 by default. It can be a number (e.g. 2) or a range (e.g. 2-4)" }, { "parameter-name": "follow_percentage", "enabled": true, "value": "100", "description": "follow given percentage of interacted users, 0 by default" }, { "parameter-name": "interact", "enabled": false, "value": [], "description": "list of hashtags and usernames. Usernames should start with \\\"@\\\" symbol. The script will interact with hashtags\\' posts likers and with users\\' followers" }, { "parameter-name": "interact_targets", "enabled": true, "value": "True", "description": "use this argument in order to interact with profiles from targets.txt" }, { "parameter-name": "total_likes_limit", "enabled": true, "value": "0", "description": "limit on total amount of likes during the session, 300 by default. It can be a number presenting specific limit (e.g. 300) or a range (e.g. 100-120)" }, { "parameter-name": "total_interactions_limit", "enabled": true, "value": "9-11", "description": "number of total interactions per session, disabled by default. It can be a number (e.g. 70) or a range (e.g. 60-80). Only successful interactions count" }, { "parameter-name": "total_follow_limit", "enabled": true, "value": "9-11", "description": "limit on total amount of follows during the session, disabled by default. It can be a number (e.g. 27) or a range (e.g. 20-30)" }, { "parameter-name": "interactions_count", "enabled": true, "value": "1", "description": "number of interactions per each blogger/hashtag, 70 by default. It can be a number (e.g. 70) or a range (e.g. 60-80). Only successful interactions count" }, { "parameter-name": "follow_limit", "enabled": false, "value": "1-3", "description": "limit on amount of follows during interaction with each one user's followers, disabled by default. It can be a number (e.g. 10) or a range (e.g. 6-9)" }, { "parameter-name": "filters", "enabled": true, "value": { "skip_business": true, "skip_non_business": false, "min_followers": 25, "max_followers": 100000, "min_followings": 10, "max_followings": 10000, "min_potency_ratio": 0.45, "min_posts": 7, "max_digits_in_profile_name": 4, "follow_private_or_empty": "private_and_public", "skip_profiles_without_stories": false, "blacklist_words": [], "mandatory_words": [], "specific_alphabet": [] }, "description": "add this argument if you want to pass filters as an argument and not from filters.json file" } ] ``` It seems to be having issues with the `KeyError: 'follow_private_or_empty'` filter, but not sure how or why as I've updated the filter to the new syntax. Any help would be really appreciated, thank you.
kerem closed this issue 2026-03-13 22:10:56 +03:00
Author
Owner

@Fadude commented on GitHub (Nov 23, 2020):

Hi, the new filter key is 'privacy_relation' instead of "follow_private_or_empty"

<!-- gh-comment-id:732058277 --> @Fadude commented on GitHub (Nov 23, 2020): Hi, the new filter key is 'privacy_relation' instead of "follow_private_or_empty"
Author
Owner

@adchsm commented on GitHub (Nov 23, 2020):

Thank you so much @Fadude - that fixed it :)

I had been looking at a comparison here: https://github.com/alexal1/Insomniac/compare/v3.3.1...v3.3.2, where it looked like the key was still the same.

Screenshot 2020-11-23 at 10 15 12

I'll leave this open and get a PR in to update the docs 👍

<!-- gh-comment-id:732064882 --> @adchsm commented on GitHub (Nov 23, 2020): Thank you so much @Fadude - that fixed it :) I had been looking at a comparison here: https://github.com/alexal1/Insomniac/compare/v3.3.1...v3.3.2, where it looked like the key was still the same. <img width="1402" alt="Screenshot 2020-11-23 at 10 15 12" src="https://user-images.githubusercontent.com/5276939/99950790-01d39880-2d75-11eb-9400-3a13745ffa2a.png"> I'll leave this open and get a PR in to update the docs 👍
Author
Owner

@adchsm commented on GitHub (Nov 26, 2020):

Closing this as I've seen they've been updated 👍

<!-- gh-comment-id:734195080 --> @adchsm commented on GitHub (Nov 26, 2020): Closing this as I've seen they've been updated 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Insomniac#620
No description provided.