wuy icon indicating copy to clipboard operation
wuy copied to clipboard

Traceback on close window

Open icarito opened this issue 6 years ago • 3 comments

Traceback from running the basic example at https://github.com/manatlan/wuy/tree/master/examples/vueapp

(virtualenv)icarito@sachamaquina:~/Proyectos/Finder$ python3 -u ./finder.py 
Will accept : ["index: ['get', '_render', 'set']"]
Abriendo en una sesión existente del navegador
- serve wuy.js to index (with resize to (400, 200))
Socket connected index
Socket disconnected index
exit
unhandled exception during asyncio.run() shutdown
task: <Task finished coro=<_run_app() done, defined at /home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web.py:261> exception=AttributeError("module 'asyncio' has no attribute 'all_tasks'",)>
Traceback (most recent call last):
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web.py", line 415, in run_app
    reuse_port=reuse_port))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 464, in run_until_complete
    raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web.py", line 348, in _run_app
    await asyncio.sleep(3600)  # sleep forever by 1 hour intervals
  File "/usr/lib/python3.5/asyncio/tasks.py", line 524, in sleep
    return (yield from future)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 285, in result
    raise CancelledError
concurrent.futures._base.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web.py", line 350, in _run_app
    await runner.cleanup()
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web_runner.py", line 221, in cleanup
    await site.stop()
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web_runner.py", line 62, in stop
    await self._runner.shutdown()
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web_runner.py", line 296, in shutdown
    await self._app.shutdown()
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/web_app.py", line 396, in shutdown
    await self.on_shutdown.send(self)
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/aiohttp/signals.py", line 34, in send
    await receiver(*args, **kwargs)  # type: ignore
  File "/home/icarito/Proyectos/Finder/.direnv/python-3.5.3/lib/python3.5/site-packages/wuy.py", line 586, in on_shutdown
    for task in asyncio.all_tasks():
AttributeError: module 'asyncio' has no attribute 'all_tasks'
exit

I tried with Python3.6 and got similar output.

icarito avatar May 31 '19 04:05 icarito

This may be relevant: https://stackoverflow.com/questions/34710835/proper-way-to-shutdown-asyncio-tasks

icarito avatar May 31 '19 04:05 icarito

have you try python 3.7 ? BTW there is a trouble when window is closed ... and I will investigate that thanks for report

manatlan avatar Jun 04 '19 16:06 manatlan

@icarito btw, can you try with python3.7 ? module 'asyncio' has no attribute 'all_tasks' in all python <3.7

For me, it works as expected

manatlan@ordi:~/Documents/python/wuy$ python3.7 examples/vueapp/app.py 
Will accept : ["index: ['_render', 'set', 'get']"]
Using PPAPI flash.
[8931:8931:0604/204406.919127:ERROR:x11_input_method_context_impl_gtk.cc(144)] Not implemented reached in virtual void libgtkui::X11InputMethodContextImplGtk::SetSurroundingText(const base::string16 &, const gfx::Range &)
- serve wuy.js to index (with resize to (400, 200))
Socket connected index
! 404 on /home/manatlan/Documents/python/wuy/examples/vueapp/web/favicon.ico
Socket disconnected index
exit
manatlan@ordi:~/Documents/python/wuy$

manatlan avatar Jun 04 '19 18:06 manatlan