Invalid Syntax with pyTelegramBotAPI

1

trying to import the library "telebot" gives me syntax error.

import telebot

I installed pyTelegramBotAPI and TelegramBotAPI perfectly with pip install

    
asked by Christian D'Albano 11.07.2018 в 19:08
source

1 answer

1

The error occurs because both async and await (corutinas) from Python 3.7 are reserved words . The name of the decorator util.async is incorrect if you intend to use this package with Python 3.7 for the reason mentioned, observing the repository this is corrected in the last commit a few days ago:

link

The package has not been updated in PyPi but what you can do is install directly from the GitHub repository:

py -3.7 -m pip  install --upgrade --force-reinstall https://codeload.github.com/eternnoir/pyTelegramBotAPI/zip/master
    
answered by 11.07.2018 в 19:45