Posts

Showing posts from October, 2020

Heroku deploy web appliaction

 When deploying a python flask web application I got an error that at=error code=H14 desc=”No web processes running” method=GET path=”/” host=xxx.herokuapp.com request_id=xxx fwd=”xxx.xx.xx.x" dyno= connect= service= status=503 bytes= Solution: Check if you have Procfile in your project root folder and if present check if you have web: <command> present to start your application. The above solution solved my problem.

Sending message to Telegram Group, User or Bot using Python

In Programming world, most of the time while automating a system/tasks you need to send completion or timely notification about the status. Now a days the easiest way of notification is WhatsApp or Telegram as our SMS and email boxes are mostly flooded with spams. In this article we will try to explain about telegram automation using simple Python script. Install json and telegram package using pip package manager: pip install json pip install python-telegram-bot read token of your telegram bot and chat_id from json file telegram_credentials.json call notify_(message) function from the point in your script where you need to send notification and pass token and chat_id to it. import json import telegram def notify_(message): t_bot = telegram.Bot(token=token) t_bot.sendMessage(chat_id=chat_id, text=message) with open('./telegram_credentials.json', 'r') as keys_file: k = json.load(keys_file) token = k['telegram_token'] chat_id...