Trouble Shooting
-
[python] RuntimeError(There is no current event loop in thread 'ThreadPoolExecutor-0_0') 해결 - ensure_future()와 create_task()의 차이점Trouble Shooting/Structural Error 2023. 5. 7. 11:58
저는 파이썬을 사용하는 서버 개발자로서 회사에서 주로 asyncio를 활용한 비동기 프로그래밍을 하고 있습니다. 저번주 업무는 여러 개의 oid에 대해서 snmp walk를 비동기로 수행하는 엔진을 만드는 것이었는데 작업 중 예상치 못한 에러를 만났습니다. 이것저것 시도해보다 에러는 잡았는데 이유가 이해되지 않아 거의 1주일을 고민했습니다. context switching, thread, coroutine등의 개념을 알고 나서야 어느 정도 이해가 되어 그 과정을 공유하고자 합니다. 에러가 발생한 부분은 async def로 정의한 코루틴 함수(table_task)를 asyncio.ensure_future()의 인자로 전달해 task로 반환시켜 task list(vendor_tasks)에 추가하는 코드였고..
-
에러 해결 - docker: invalid reference format: repository name must be lowercase.Trouble Shooting/Syntax Error 2023. 2. 19. 12:48
나의 경우는 -v 옵션과 argument를 빠뜨려서 에러가 발생했었다. 아래는 에러 해결 과정이다. $ docker run --network host /Users/an_yoojin/Downloads/redis.conf:/redis.conf redis redis-server /redis.conf 명령으로 host의 네트워크를 사용할 수 있도록 --network 옵션을 줘서 컨테이너를 생성하는데 invalid reference format: repository name must be lowercase 에러를 만났다. repository name이 lowercase여야 한다...? 스택오버플로우에서 해결의 실마리가 될 것 같은 질문과 답변을 발견했지만 해결할 수 없었고 https://stackoverflow...