Search code examples
pythonproxytelegramtelegram-botpysocks

telegram bot proxy in python


I am using Telebot to make a python bot for Telegram

bot = telebot.TeleBot('TokenHere')
apihelper.proxy = {'https': 'socks5://user:[email protected]:1080'}
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
    bot.reply_to(message, "Hello?")

I have a latest version installed: gunicorn, PySocks, pyTelegramBotAPI, requests and urllib3

still receive error:

AssertionError: Not supported proxy scheme socks5

Proxy works fine i checked it with another bot.


Solution

  • Just deleted a python-requests via yum, and installed via pip