top | item 24018356 (no title) zeronone | 5 years ago Indentation is wrong in following statement ``` return once_wrapper ``` discuss order hn newest natch|5 years ago Duh, thanks! Now I have a new one but I think it just means the script needs to stay running longer so the coroutine can have time to do its thing. ./once.py:29: RuntimeWarning: coroutine 'once. <locals>.once_wrapper' was never awaited one_time_setup() prashnts|5 years ago Your main function needs to be async as well, since the one_time_setup is async. Linking this SO answer that also links to the docs (may come handy!).https://stackoverflow.com/questions/57399157/runtimewarning-...Edit: Also tangentially relevant is the article linked by pansa2 in another thread, which was also discussed on HN a few months ago: http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y... load replies (1)
natch|5 years ago Duh, thanks! Now I have a new one but I think it just means the script needs to stay running longer so the coroutine can have time to do its thing. ./once.py:29: RuntimeWarning: coroutine 'once. <locals>.once_wrapper' was never awaited one_time_setup() prashnts|5 years ago Your main function needs to be async as well, since the one_time_setup is async. Linking this SO answer that also links to the docs (may come handy!).https://stackoverflow.com/questions/57399157/runtimewarning-...Edit: Also tangentially relevant is the article linked by pansa2 in another thread, which was also discussed on HN a few months ago: http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y... load replies (1)
prashnts|5 years ago Your main function needs to be async as well, since the one_time_setup is async. Linking this SO answer that also links to the docs (may come handy!).https://stackoverflow.com/questions/57399157/runtimewarning-...Edit: Also tangentially relevant is the article linked by pansa2 in another thread, which was also discussed on HN a few months ago: http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y... load replies (1)
natch|5 years ago
prashnts|5 years ago
https://stackoverflow.com/questions/57399157/runtimewarning-...
Edit: Also tangentially relevant is the article linked by pansa2 in another thread, which was also discussed on HN a few months ago: http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...