Closed Tankr3d closed 5 years ago
So
photo_path = bot.download_photo(new_media_id, save_description=True)
returns True
.
This means the problem is here https://github.com/instagrambot/instabot/blob/master/instabot/api/api_photo.py#L21 or https://github.com/instagrambot/instabot/blob/master/instabot/api/api_photo.py#L16
Either api/api_photo.py
has to change or the example script.
I've opened https://github.com/instagrambot/instabot/pull/582 which should fix this problem.
@basnijholt Thanks for your help but i still can not get it to work here the error code if i changed api_photo and repost_best_photos_from_users as you wrote:
2018-06-25 15:44:19,712 - INFO - Logged-in successfully as 'machine4meme' using the cookie!
Getting media info: 100%|███████████████████████████████████████████████████████████| 84/84 [00:37<00:00, 2.15it/s]
Traceback (most recent call last):
File "repost_best_photos_from_users.py", line 91, in
Do you get this error for the very first photo or after several?
@basnijholt If this error occurs, the bot has not yet loaded a photo.
So it never ever works?
@basnijholt No
@sudoguy should probably look at it then because he wrote this script.
@basnijholt Hopefully he'll answer
This isn't fixed yet.
Problem with , x ['comment_count']
I just deleted it and repost is work now.
But...
I want that the bot is keep work and do repost less "best" photo from another account.
How it's possible?
Or how to make the bot do repost the best photo from each account.
@EightShift you can launch it with a different username as argument, or create a loop for each account inside the script.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Problem with
, x ['comment_count']
I just deleted it and repost is work now. But... I want that the bot is keep work and do repost less "best" photo from another account. How it's possible?
Have same issue. Replace with:
try: best_medias = sorted(best_medias, key=lambda x: (x['like_count'], x['comment_count']), reverse=True) except KeyError: best_medias = sorted(best_medias, key=lambda x: x['like_count'], reverse=True)
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like so [x]).Before submitting an issue, make sure you have:
Purpose of your issue?
If I create the missed files ( posted_medias.txt and username_database.txt ) and drag it in examples I got this error (I use Python 3.6):
2018-06-08 12:38:30,593 - INFO - Logged-in successfully as 'machine4meme' using the cookie! Getting media info: 100%|██████████████████████████████████████████████████████████████| 72/72 [00:28<00:00, 2.12it/s] Reposting photos: 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "C:\Users\Tom\Downloads\instabot-master\examples\repost_best_photos_from_users.py", line 90, in repost_best_photos(bot, users, args.amount) File "C:\Users\Tom\Downloads\instabot-master\examples\repost_best_photos_from_users.py", line 26, in repost_best_photos repost_photo(bot, media) File "C:\Users\Tom\Downloads\instabot-master\examples\repost_best_photos_from_users.py", line 65, in repost_photo with open(photo_path[:-3] + 'txt', 'r') as f: TypeError: 'bool' object is not subscriptable 2018-06-08 12:39:10,002 - INFO - Bot stopped. Worked: 23 days, 22:24:52.461533 2018-06-08 12:39:10,002 - INFO - Total requests: 875