InstaPy / InstaPy/InstaPy

ValueError: Sample larger than population or is negative

Open
#6,498 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
18.2k
Forks
3.9k
PR merge metrics
No merged PRs in 30d

Description

Hello,
last night it was working well, since today noon I get this error.

Running in `headless_browser=True` if needed.

```
__________________________________________________________________________________________
INFO [2022-02-11 21:35:40] [usr] Starting to follow user `Followers`..
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
INFO [2022-02-11 21:35:40] [usr] User 'melissariso' [1/2]
INFO [2022-02-11 21:35:50] [usr] GraphQL query hash: [c76146de99bb02f6415203be841dd25a]

INFO [2022-02-11 21:35:53] [usr] Sessional Live Report:
|> No any statistics to show

On session start was FOLLOWING 2067 users & had 55900 FOLLOWERS
[Session lasted 1.61 minutes]
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2022-02-11 21:35:53] [usr] Session ended!
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Traceback (most recent call last):
File "quickstart.py", line 25, in
session.follow_user_followers(['melissariso'], amount=25, randomize=True, interact=True)
File "/home/usr/git/InstaPy/instapy/instapy.py", line 3678, in follow_user_followers
person_list, simulated_list = get_given_user_followers(
File "/home/usr/git/InstaPy/instapy/unfollow_util.py", line 1007, in get_given_user_followers
person_list, simulated_list = get_users_through_dialog_with_graphql(
File "/home/usr/git/InstaPy/instapy/unfollow_util.py", line 825, in get_users_through_dialog_with_graphql
followers_list = random.sample(followers_list, real_amount)
File "/usr/lib/python3.8/random.py", line 363, in sample
raise ValueError("Sample larger than population or is negative")
ValueError: Sample larger than population or is negative
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.