May-28-2020, 07:01 PM
I'm trying to wait for a tkinter dialog response to complete to get the results. I'm getting what seems to be a common problem but none of the threads I found seem to apply.
RuntimeWarning: coroutine 'frontPanel.dialog' was never awaited
Can someone tell me what I am doing wrong? TIA.
self.lock=asyncio.Lock() self.answer=None . . . # start the dialog and wait for the response to be set self.dialog(self.root,'HTTP Port',self.xml.getHTTPPort()) print('finally ',self.answer) . . . async def dialog(self,master,text,default): async with self.lock: #call the function that does the tkinter dialog and wait for the answer to be set functions.dialog(master,text,default) print('dialog',self.answer) async def setAnswer(self,ans): # called from the tkinter dialog code which sets the answer and releases the lock self.answer=ans self.lock.release()When I run this I get the error:
RuntimeWarning: coroutine 'frontPanel.dialog' was never awaited
Can someone tell me what I am doing wrong? TIA.