Nuitka-compiled web app raises error on exit

£可爱£侵袭症+ 提交于 2020-01-04 06:16:28

问题


I am working on a real-time 3d web application project. It is built on top of Bottle and Gevent (using bottle-websocket plugin).

After compilation using Nuitka, our dev server works fine except one: raises error on Ctrl+C exit. The error output is shown below

$ ./__main__.bin  server
Bottle v0.12.18 server starting up (using GeventWebSocketServer())...
Listening on http://0.0.0.0:8080/
Hit Ctrl-C to quit.

^CKeyboardInterrupt
2019-12-20T17:05:28Z
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import fnmatch, glob, traceback, errno, sys, atexit, locale, imp
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/gevent/baseserver.py", line 369, in serve_forever
    self._stop_event.wait()
  File "src/gevent/event.py", line 127, in gevent._event.Event.wait
  File "src/gevent/_abstract_linkable.py", line 192, in gevent.__abstract_linkable.AbstractLinkable._wait
  File "src/gevent/_abstract_linkable.py", line 165, in gevent.__abstract_linkable.AbstractLinkable._wait_core
  File "src/gevent/_abstract_linkable.py", line 169, in gevent.__abstract_linkable.AbstractLinkable._wait_core
  File "src/gevent/_greenlet_primitives.py", line 60, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 60, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 64, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/__greenlet_primitives.pxd", line 35, in gevent.__greenlet_primitives._greenlet_switch
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/yunbo/Workspace/jk/backend/__main__.py", line 80, in <module>
  File "/home/yunbo/Workspace/jk/backend/__main__.py", line 56, in main
  File "/home/yunbo/Workspace/jk/backend/jk/system/server/server.py", line 41, in run
    run(
  File "/usr/local/lib/python3.6/dist-packages/bottle.py", line 3137, in run
    server.run(app)
  File "/usr/local/lib/python3.6/dist-packages/bottle_websocket/server.py", line 17, in run
    server.serve_forever()
  File "/usr/local/lib/python3.6/dist-packages/gevent/baseserver.py", line 371, in serve_forever
    Greenlet.spawn(self.stop, timeout=stop_timeout).join()
  File "src/gevent/greenlet.py", line 588, in gevent._greenlet.Greenlet.spawn
  File "src/gevent/greenlet.py", line 258, in gevent._greenlet.Greenlet.__init__
  File "src/gevent/greenlet.py", line 150, in gevent._greenlet._extract_stack
TypeError: Cannot convert compiled_frame to frame

Why this happened?

来源:https://stackoverflow.com/questions/59429101/nuitka-compiled-web-app-raises-error-on-exit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!