@Qnemes

Heroku — крашится скрипт на Python после деплоя, ошибка H10, как решить?

Сама ошибка в логах:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Stopping process with SIGKILL
Process exited with status 137

Procfile:
web: python VKBot.py

requirements.txt:
certifi==2019.11.28
chardet==3.0.4
idna==2.8
numpy==1.17.4
requests==2.22.0
six==1.13.0
urllib3==1.25.7
vk-api==11.6.1

Сам скрипт (локально все работает):
import requests
    import vk_api

    vk_session = vk_api.VkApi(token='mytoken')

    from vk_api.longpoll import VkLongPoll, VkEventType
    longpoll = VkLongPoll(vk_session)
    vk = vk_session.get_api()
    for event in longpoll.listen():
        if event.type == VkEventType.MESSAGE_NEW and event.to_me and event.text:
          if event.text == 'text' or event.text == 'ortext':
                if event.from_user: 
                    vk.messages.send( 
                        user_id=event.user_id,
                        message='mytext'
            )
                elif event.from_chat:
                    vk.messages.send( 
                        chat_id=event.chat_id,
                        message='text'
            )

runtime.txt
python-3.8.0
  • Вопрос задан
  • 287 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы