반응형
발단 사항 -> 비동기 작업중 발생
발단 원인 -> 사용하는 함수 중 비동기 함수로 설정 안한 것이 있으면 일어나는 에러
내가 사용하는 함수 중 비동기가 함수 가 없는지 확인하고 없으면 async 만들어주기
example)
import asyncio
from typing import Dict
def not_data_sync(**data: Dict) -> Dict:
return data
async def main_function() -> int:
data = not_data_sync({"test": "error"}) # ERROR!!
return data
asyncio.run(main_function())
반응형
'오류모음집 > python' 카테고리의 다른 글
ImportError: attempted relative import with no known parent package (0) | 2023.05.02 |
---|