python-eel / Eel

A little Python library for making simple Electron-like HTML/JS GUI apps
MIT License
6.42k stars 586 forks source link

PYDEV DEBUGGER WARNING: #596

Closed Sandwich1699975 closed 2 years ago

Sandwich1699975 commented 2 years ago

Eel version 0.14.0

Describe the bug When running Eel in Debug mode in Vs-Code. I get the following warning in console:

PYDEV DEBUGGER WARNING:
sys.settrace() should not be used when the debugger is being used.
This may cause the debugger to stop working correctly.
If this is needed, please check: 
http://pydev.blogspot.com/2007/06/why-cant-pydev-debugger-work-with.html
to see how to restore the debug tracing back correctly.
Call Location:
  File "/Users/freddy/.pyenv/versions/3.10.3/lib/python3.10/site-packages/gevent/threadpool.py", line 157, in _before_run_task
    _sys.settrace(_get_thread_trace())

PYDEV DEBUGGER WARNING:
sys.settrace() should not be used when the debugger is being used.
This may cause the debugger to stop working correctly.
If this is needed, please check: 
http://pydev.blogspot.com/2007/06/why-cant-pydev-debugger-work-with.html
to see how to restore the debug tracing back correctly.
Call Location:
  File "/Users/freddy/.pyenv/versions/3.10.3/lib/python3.10/site-packages/gevent/threadpool.py", line 162, in _after_run_task
    _sys.settrace(None)

To Reproduce Steps to reproduce the behavior:

  1. Run:
import eel

def main() -> None:

    eel.init('web')
    eel.start('login.html')

if __name__ == "__main__":
    main()

In Visual Studio Code in debug mode. F5

  1. View console output

Expected behavior No warning

Desktop:

dstricks commented 2 years ago

The source file causing that issue is from the 3rd party gevent package; specifically gevent/threadpool.py. Someone submitted an issue on the gevent project and those maintainers provided a detailed response which you can read here. Based on the thread, it looks like this warning can be ignored a majority of the time, but if problems are happening, then updating to a newer version of gevent might resolve them.

So is this causing VS Code to misbehave? Or is this issue submission more of an alert to the group that something seems wrong?

Sandwich1699975 commented 2 years ago

So is this causing VS Code to misbehave? Or is this issue submission more of an alert to the group that something seems wrong?

It's just a warning that something seemed wrong. Thanks for the reply, I'll check it out 👍

gbrault commented 1 year ago

even setting gevent to true in launch.json does not cure the issue