ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.71k stars 1.47k forks source link

error getUserFollowers #419

Closed mgaforever closed 6 years ago

mgaforever commented 6 years ago

Please follow the guide below


Before submitting an issue, make sure you have:

Purpose of your issue?


The following sections requests more details for particular types of issues, you can remove any section (the contents between the triple ---) not applicable to your issue.


For a bug report, you must include the Python version used, code that will reproduce the error, and the error log/traceback.

Paste the output of python -V here: 3.6

Code:

# Example code that will produce the error reported
from instabot import Bot

bot = Bot()
followers = bot.get_user_followers("Nameuser")

Error/Debug Log:

    self.getUserFollowers(usernameId, next_max_id)
  File "../../../instabot/api/api.py", line 417, in getUserFollowers
    maxid))
  File "../../../instabot/api/api.py", line 150, in SendRequest
    self.LastJson = json.loads(response.text)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 60567 (char 60566)
 File "../instabot/api/api.py", line 596, in getTotalFollowers
    self.getUserFollowers(usernameId, next_max_id)
  File "../../../instabot/api/api.py", line 417, in getUserFollowers
    maxid))
  File "../../../instabot/api/api.py", line 150, in SendRequest
    self.LastJson = json.loads(response.text)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 60567 (char 60566)

Describe your issue

when I launch get_user_followers to get the list of followers of a given user in some cases while he is downloading the list he launches the errand previously reported

sudoguy commented 6 years ago

@mgaforever You are forget to add bot.login(username="user", password="pass") after bot = Bot()