You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to use shiv to deploy an executable for an asyncio based app using poetry as the build tool and I am running into a coroutine not awaited error that I can't see where it stems from; can you point me in the right direction? is this something you have seen before?. I have the following project tree:
import asyncio
import bacnet_client as app
async def main():
await app.main()
if __name__ == "__main__":
asyncio.run(main())
app.py
import asyncio
import logging
import queue
import json
import re
from logging.handlers import QueueHandler
async def main():
"""
Run or schedule all your services from this entry-point script.
"""
try:
loop = asyncio.get_running_loop()
logQ = queue.Queue()
logProducer = QueueHandler(logQ)
logProducer.setFormatter(JsonFormatter(datefmt=ISO8601))
logger = logging.getLogger('ClientLog')
logger.addHandler(logProducer)
logger.setLevel(logging.DEBUG)
logger_task = loop.create_task(log(logQ))
await logger_task
finally:
logger.info("Client application stopping:")
logger.info(None)
logger_task.cancel()
if __name__ == "__main__":
asyncio.run(main())
Ultimately the error output after running build.sh is as follows: <coroutine object main at 0x7f62e17037d0>
sys:1: RuntimeWarning: coroutine 'main' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
PS.
I did import the tracemalloc and wired some functions into the app.py's main function and __main__.py but it failed with the same error and tracemalloc did not provide any output.
Thank you so much.
The text was updated successfully, but these errors were encountered:
I'm facing similar issue when I'm trying to use this with a tornado application. Getting below error.
<coroutine object main at 0x7fc2538df790>
sys:1: RuntimeWarning: coroutine 'main' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Hi, I am trying to use shiv to deploy an executable for an asyncio based app using poetry as the build tool and I am running into a coroutine not awaited error that I can't see where it stems from; can you point me in the right direction? is this something you have seen before?. I have the following project tree:
build.sh
main.py
app.py
Ultimately the error output after running build.sh is as follows:
<coroutine object main at 0x7f62e17037d0>
sys:1: RuntimeWarning: coroutine 'main' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
PS.
I did import the tracemalloc and wired some functions into the app.py's main function and
__main__.py
but it failed with the same error and tracemalloc did not provide any output.Thank you so much.
The text was updated successfully, but these errors were encountered: