Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [python-asyncio]

This tag is to be used for the asyncio Python package which provides mechanisms for writing single-threaded concurrent code. The asyncio package provides asynchronous I/O, event loop, coroutines and tasks beginning with Python 3.4.

1 vote
1 answer
30 views

Event loop is closed Python Async

I've built an email script , utilising a user's app key from google to get access to their email. However when i run the script i get the error 'Runtime Error: event loop is closed. On initial ...
Jadore Thompson's user avatar
-1 votes
0 answers
34 views

discord.py app command error handling won't work because responses take >5 seconds

I'm having this issue where before a few days ago, everything worked fine, but suddenly any error handling will take too long to be in the 3 second time frame for the response to be handled. Nothing ...
JoniKauf's user avatar
0 votes
0 answers
23 views

Please help I am just starting to learn programming and I try to create aiogram acyncio telegram bot, but I can't call the function in for loop

There handlers for get message from user and that work but in for loop I need to stop loop and get new message from user and store it in variable new_answer. Then I need use that variable in if ...
JohnyBi python beginner's user avatar
0 votes
1 answer
49 views

Async with condition - Python

I created a python script that brings some data back from various APIs for accountIds list provided to it. One API is crucial for the result of other APIs, however while using the script I noticed ...
Bumblebee's user avatar
0 votes
0 answers
42 views

Asynchronous CPU-Bounded task PYTHON

I have a class "FXvolatility" which can interpolate some value based on two inputs (float, datetime) via this following method: async def interpolate_volatility_async(self, udl:str, expiry:...
Arbitrageously's user avatar
0 votes
0 answers
40 views

How to create a parallel program that reads different data

I'm trying to create a process that listens to three COM ports and process the data in parallel. The problem is that I have a machine that sends an ID and proceeds to do a test in one of the COM ports,...
user26427062's user avatar
0 votes
1 answer
41 views

Walking all OIDs from base OID using walkCmd using pysnmp-lextudio

I'm new to pysnmp(-lextudio) and have zero experience with asyncio as well. I'm trying to walk all OIDs from a base OID (ciscoSmartLicMIB - .1.3.6.1.4.1.9.9.831). Apparently the old way to do this was ...
Gary Giesen's user avatar
0 votes
1 answer
33 views

Apply async batching to Dataframe.apply()?

I have already checked out this url: Can I execute a function in "apply" to pandas dataframe asynchronously?(Can I execute a function in "apply" to pandas dataframe asynchronously?)...
Poojan Naik's user avatar
0 votes
1 answer
66 views

how to run data processing tasks asynchronously in fast api? [duplicate]

I have a route in my fast api application, (sample code below). my root route calls an async function called read_root. in this function , i want to query database , gets some result and upload it to ...
kishi's user avatar
  • 125
0 votes
0 answers
44 views

GUI unable to send messages through Manager().Queue() to the processes

Please guide me in the right direction if this is already answered. I have a GUI script that has several buttons and when I click the start button, it needs to send a message to a process which is ...
Keerthan Rao's user avatar
0 votes
0 answers
74 views

Understanding sync_to_async method in Django?

I have never worked with asyncio and/or asynchronous methods with django and am having a little difficulty understanding. I am trying to convert a synchronous utility function (create_email_record) ...
master_j02's user avatar
0 votes
0 answers
28 views

qasync with IPython hangs on run_until_complete

I would like to have an asynchronous gui with PyQt5. The synchronous version of what I want would look like this: from PyQt5.QtWidgets import QPushButton, QMainWindow import asyncio import time import ...
Marc's user avatar
  • 1
1 vote
1 answer
24 views

When using AsyncClients in Google Cloud Python SDK, got future attached to a different loop

I'm quite new to using asyncio in Python. Originally I have a sync function speak: from google.cloud import texttospeech client = texttospeech.TextToSpeechClient() def speak(*args): # omitted ...
Henry M's user avatar
  • 85
0 votes
1 answer
44 views

Best approach to object creation in the background without using a task queue system?

I have been thinking of the best approach to a record creation in the background without using django signals, or celery, etc. I do not want to use signals due to the fact that the sender Model would ...
master_j02's user avatar
1 vote
0 answers
38 views

Why can't I call Run from asyncio twice in the same function?

I am using Celery to process background tasks in my application. Sometimes, I need to process asynchronous functions within those tasks, for which I use asyncio. And in this case, I also need to ...
Diego L's user avatar
  • 840

15 30 50 per page
1
2 3 4 5
516