Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caption has suddenly stopped working #31

Open
v3lip opened this issue Sep 5, 2020 · 2 comments
Open

Caption has suddenly stopped working #31

v3lip opened this issue Sep 5, 2020 · 2 comments

Comments

@v3lip
Copy link

v3lip commented Sep 5, 2020

Captions worked for my first pics, but now it has suddenly stopped working for some reason. I made a new Python-script to test this, and it doesn't work here either. The image gets uploaded, but there's no caption. Here's the code:

from instabot import Bot
from PIL import Image
import random, os, time, json

data = json.loads(open('config.json').read())
bot = Bot()
bot.login(  username = data['username'],
            password = data['password'])


print(' >>> Starting Bot..')

image = random.choice(os.listdir('rips/reddit_sub_memes/'))
bot.upload_photo('rips/reddit_sub_memes/' + image, 
                              caption="Test Caption")

- Kind regards

@UndercoverButter
Copy link

UndercoverButter commented Nov 2, 2020

Same +1

Edit:

I might have found a quick and dirty fix: go through all functions which upload_photo calls and also provide the caption as argument. In the defintions of those functions remove the default value for caption which is always "" or None. Probably somewhere in the calling of the function the original caption is lost and replace by the default empty caption.

Edit2: nope, it broke again

@andyzasl
Copy link

Same +1 happened today :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants