Skip to content
Advertisement

Tag: aiohttp

How to nullify python asyncio global variables?

I am writing a personal Telegram Bot to collect statistics on my accounts market.csgo.com. The main task of the bot is to send async requests to the API and display information via Telegram. Everything works as it should, but the problem is with global variables, or rather, their incorrect counting. An example of one of my functions: Function result: Bot

Asyncio combined with custom modules and aiohttp

I am trying to sleep a module for a couple seconds, while sleeping, the script should continue running. When the sleep is over, the module should put data[“found”] = True, but the code never reaches past asyncio.sleep() The code should print: “bulbasaur” “do stuff” x 5 “bulbasaur” But bulbasaur never comes back. main.py: pokemon.py: nba.py Answer The issue lies in

TraceBack Cannot connect to host api.telegram.org:443

I wrote a telegram bot on the aiogram framework. The bot worked fine for over a week, with no problems. The customer started complaining about the bot freezing. I downloaded the log file and saw a bunch of different TraceBacks. This situation has been happening for two days now. List of 3 TraceBacks, for example: First Second Third On my

SSL error TLSV1_ALERT_INTERNAL_ERROR with aiohttp library

I have an application making api requests via aiohttp library. I make around 10 requests/second. About once a hour I get the following error: Initially, I didn’t have ssl=False but added to try and avoid this error, but it had no effect, about once a hour I get this error still. I could simply add a try catch to catch

“This event loop is already running” and other problems when integrating aiohttp examples in my own application

I read a lot of the aiohttp related blogs and examples. I think I understand them but when I try to integrate that “knowledge” into the structure of my own application there are some problems. Below is a minimal (not) working example representing this structure. I assume I have a grounded misunderstanding of how the structure of such a program

Advertisement