insta-unfollower icon indicating copy to clipboard operation
insta-unfollower copied to clipboard

AttributeError: 'dict' object has no attribute 'text'

Open narzero opened this issue 3 years ago • 0 comments

I just ran this with Docker via

docker pull tuxity/insta-unfollower:latest
docker run -d -v $(pwd)/cache:/usr/src/insta-unfollower/cache --env INSTA_USERNAME=myusername --env INSTA_PASSWORD=mypassword tuxity/insta-unfollower:latest

First run - after 3 successful unfollows I get this error:

Error while trying to unfollow XYZ. Retrying in a bit...
Traceback (most recent call last):
  File "/usr/src/insta-unfollower/insta-unfollower.py", line 289, in <module>
    main()
  File "/usr/src/insta-unfollower/insta-unfollower.py", line 280, in main
    while unfollow(user) == False:
  File "/usr/src/insta-unfollower/insta-unfollower.py", line 199, in unfollow
    print('ERROR: {}'.format(response.text))
AttributeError: 'dict' object has no attribute 'text'

And the container stops.

Second run - a different error (#64 & #49) when trying to unfollow the same user as before:

Unfollowing XYZ...
Traceback (most recent call last):
  File "/usr/src/insta-unfollower/insta-unfollower.py", line 289, in <module>
    main()
  File "/usr/src/insta-unfollower/insta-unfollower.py", line 280, in main
    while unfollow(user) == False:
  File "/usr/src/insta-unfollower/insta-unfollower.py", line 195, in unfollow
    response = json.loads(response.text)
  File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)

narzero avatar Dec 30 '21 20:12 narzero