Closed kintaro1981 closed 6 years ago
I tried this fix and the issue changed to this:
Traceback (most recent call last):
File "/Users/xxx/Google Drive/xxx/Social Media/InstaBot/scripts/follow_user_followers.py", line 27, in <module>
bot.follow_followers(username)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot.py", line 471, in follow_followers
return follow_followers(self, user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot_follow.py", line 76, in follow_followers
followers = self.get_user_followers(user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot.py", line 356, in get_user_followers
return get_user_followers(self, user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot_get.py", line 181, in get_user_followers
followers = self.api.get_total_followers(user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 613, in get_total_followers
user_id, amount, 'followers')
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 588, in get_total_followers_or_followings
get(user_id, next_max_id)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 430, in get_user_followers
return self.send_request(url)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 174, in send_request
except json.decoder.JSONDecodeError:
AttributeError: 'module' object has no attribute 'JSONDecodeError'
2018-07-16 12:12:44,301 - INFO - Bot stopped. Worked: 0:11:48.785699
2018-07-16 12:12:44,302 - INFO - Total requests: 34031
and now follow_user_followers.py started to give this error:
Traceback (most recent call last):
File "/Users/xxx/Google Drive/xxx/Social Media/InstaBot/scripts/follow_user_followers.py", line 27, in <module>
bot.follow_followers(username)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot.py", line 471, in follow_followers
return follow_followers(self, user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot_follow.py", line 76, in follow_followers
followers = self.get_user_followers(user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot.py", line 356, in get_user_followers
return get_user_followers(self, user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot_get.py", line 181, in get_user_followers
followers = self.api.get_total_followers(user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 613, in get_total_followers
user_id, amount, 'followers')
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 588, in get_total_followers_or_followings
get(user_id, next_max_id)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 430, in get_user_followers
return self.send_request(url)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 174, in send_request
except json.decoder.JSONDecodeError:
AttributeError: 'module' object has no attribute 'JSONDecodeError'
2018-07-19 20:48:32,946 - INFO - Bot stopped. Worked: 0:00:05.283279
2018-07-19 20:48:32,947 - INFO - Total requests: 35200
Use master where this is fixed.
@basnijholt I uninstalled with sudo pip uninstall -y instabot
and reinstalled with sudo pip install -U instabot
and now I have the original problem.
That's because you are not installing master
Do pip install https://github.com/instagrambot/instabot/archive/master.zip
I'm on macOS 10.13.2
I have done:
sudo pip uninstall -y instabot
then:
sudo pip install https://github.com/instagrambot/instabot/archive/master.zip
if I launch "follow_user_followers.py usernametofollowfollowers" I get this:
Traceback (most recent call last):
File "/Users/xxx/Google Drive/xxx/Social Media/InstaBot/scripts/follow_user_followers.py", line 27, in <module>
bot.follow_followers(username)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot.py", line 472, in follow_followers
return follow_followers(self, user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot_follow.py", line 76, in follow_followers
followers = self.get_user_followers(user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot.py", line 357, in get_user_followers
return get_user_followers(self, user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/bot/bot_get.py", line 183, in get_user_followers
followers = self.api.get_total_followers(user_id, nfollows)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 613, in get_total_followers
user_id, amount, 'followers')
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 588, in get_total_followers_or_followings
get(user_id, next_max_id)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 430, in get_user_followers
return self.send_request(url)
File "/usr/local/lib/python2.7/site-packages/instabot/api/api.py", line 174, in send_request
except json.decoder.JSONDecodeError:
AttributeError: 'module' object has no attribute 'JSONDecodeError'
2018-07-20 21:54:33,990 - INFO - Bot stopped. Worked: 3:49:08.314985
2018-07-20 21:54:33,991 - INFO - Total requests: 35289
This is my out up uninstalling and installing instabot:
$ sudo -H pip uninstall -y instabot
Password:
Uninstalling instabot-0.4.2:
Successfully uninstalled instabot-0.4.2
$ sudo -H pip install https://github.com/instagrambot/instabot/archive/master.zip
Collecting https://github.com/instagrambot/instabot/archive/master.zip
Downloading https://github.com/instagrambot/instabot/archive/master.zip (665kB)
100% |████████████████████████████████| 665kB 8.2MB/s
Requirement already satisfied: tqdm in /usr/local/lib/python2.7/site-packages (from instabot==0.4.2) (4.23.1)
Requirement already satisfied: requests-toolbelt in /usr/local/lib/python2.7/site-packages (from instabot==0.4.2) (0.8.0)
Requirement already satisfied: requests in /usr/local/lib/python2.7/site-packages (from instabot==0.4.2) (2.18.4)
Requirement already satisfied: schedule in /usr/local/lib/python2.7/site-packages (from instabot==0.4.2) (0.5.0)
Requirement already satisfied: future in /usr/local/lib/python2.7/site-packages (from instabot==0.4.2) (0.16.0)
Requirement already satisfied: six in /usr/local/lib/python2.7/site-packages (from instabot==0.4.2) (1.11.0)
Requirement already satisfied: huepy in /usr/local/lib/python2.7/site-packages (from instabot==0.4.2) (0.9.8.1)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/site-packages (from requests->instabot==0.4.2) (2017.11.5)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/site-packages (from requests->instabot==0.4.2) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python2.7/site-packages (from requests->instabot==0.4.2) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/site-packages (from requests->instabot==0.4.2) (1.22)
Building wheels for collected packages: instabot
Running setup.py bdist_wheel for instabot ... done
Stored in directory: /private/tmp/pip-ephem-wheel-cache-TPHmDR/wheels/6f/c5/96/f7e21f84f43f3d213247adb395ffa7418b85f913a06bec5a98
Successfully built instabot
Installing collected packages: instabot
Successfully installed instabot-0.4.2
and this is my actual apy.py: https://pastebin.com/Zgs0artZ
anyone can help please?
I add that I'm on macOS 10.13.2
I tried again right now and it's working... I don't know what to say. I'm a little confused.
and now started again with the AttributeError: 'module' object has no attribute 'JSONDecodeError'
Oh I know why that happens now. json.decoder.JSONDecodeError
doesn't exist in Python 2 but does exist in Python 3.
I think I fixed it with https://github.com/instagrambot/instabot/commit/542a35d5ef510183999e5aa825d2f1a0b113a0f1.
Could you install the latest version from master and try it out?
it's seems solved now.
do you recommend to update to Python 3 anyway?
Where I can put the 'username' inside the code of follow_user_followers.py?
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:Python 2.7.13
Code:
Error/Debug Log:
follow_user_followers.py username
unfollow_non_followers.py
Describe your issue
The account I want to follow followers have 10k and the script stop after it loads 30/40%. It's suddenly started to do it.
I tried to run unfollow_non_followers.py and i stop immediatly.