J
J
Jomm2021-06-18 21:56:34
Python
Jomm, 2021-06-18 21:56:34

Import telebot invalid syntax?

I have a code that gives an error when run

import telebot

bot = telebot.TeleBot(ТУТ ТОКЕН)
message = 'test'

bot.send_message(111111111, message)


Mistake:
Traceback (most recent call last):
  File "bot.py", line 1, in <module>
    import telebot
  File "C:\Python27\lib\site-packages\telebot\__init__.py", line 459
    e.args = e.args + (f'Typed middleware handler "{typed_middleware_handler.__qualname__}"',)
                                                                                           ^
SyntaxError: invalid syntax

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Krostelev, 2021-06-18
@Jomm

you are using python 2.7 install 3.6+

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question