-----> Failed to detect app matching https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz buildpack
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
self._updater.bot.set_webhook("https://имя_вашего_приложения.herokuapp.com/" + self._token) 2017-04-10T14:08:21.086556+00:00 app[web.1]: ModuleNotFoundError: No module named 'telebot'
2017-04-10T14:08:21.086517+00:00 app[web.1]: import telebot
2017-04-10T14:08:21.194284+00:00 heroku[web.1]: State changed from starting to crashed
2017-04-10T17:00:00.641113+00:00 heroku[web.1]: State changed from crashed to starting
2017-04-10T17:00:06.063036+00:00 heroku[web.1]: Starting process with command `python3 main.py`
2017-04-10T17:00:08.472895+00:00 app[web.1]: Traceback (most recent call last):
2017-04-10T17:00:08.472917+00:00 app[web.1]: File "main.py", line 3, in
2017-04-10T17:00:08.473066+00:00 app[web.1]: import telebot
2017-04-10T17:00:08.473106+00:00 app[web.1]: ModuleNotFoundError: No module named 'telebot'
2017-04-10T17:00:08.586876+00:00 heroku[web.1]: State changed from starting to crashed
2017-04-10T17:00:08.570948+00:00 heroku[web.1]: Process exited with status 1
import os
import requests
from telegram.ext import CommandHandler, Updater
class Bot:
def __init__(self, token, debug=False):
self._token = token
self._updater = Updater(token)
self._debug = debug
self._init_handlers()
def run(self):
port = int(os.environ.get('PORT', '5000'))
self._updater.start_webhook(listen='0.0.0.0', port=port,
url_path=self._token)
self._updater.bot.set_webhook(os.environ.get("URL") +
self._token)
self._updater.idle()
def _init_handlers(self):
self._updater.dispatcher.add_handler(CommandHandler('rate', self._check_rate))
def log_params(method_name, update):
logger.debug("Method: %s\nFrom: %s\nchat_id: %d\nText: %s" %
(method_name,
update.message.from_user,
update.message.chat_id,
update.message.text))
def start(bot, update):
log_params('start', update)
bot.sendMessage(update.message.chat_id
, text="""Привет!""")
def bot():
updater = Updater(TOKEN)
# Get the dispatcher to register handlers
dp = updater.dispatcher
# Add handlers for Telegram messages
dp.addTelegramCommandHandler("start", start)
updater.start_polling()
updater.idle()
if __name__ == '__bot__':
bot()