I
I
igreklpofrss2021-12-01 15:58:39
Python
igreklpofrss, 2021-12-01 15:58:39

How to combine TelegramBot and InstagramBot without ValueError: signal only works in main thread?

Greetings! Let me just say that I am a newbie. I am writing a Telegram bot. At the user's command, the bot should run a piece of code that logs in to the Instagram account and posts a photo. I am using the instabot library. The problem is that after launching after authorization, the error ValueError: signal only works in main thread is thrown. I understand that Python works in one thread, and 2 bots create "2 threaded" requests to the servers from both bots. How can this be fixed? What library is suitable for this case?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question