Skip to content

[BUG] WinError 10038 during hot reload #2438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
niekvleeuwen opened this issue Mar 1, 2023 · 3 comments
Closed

[BUG] WinError 10038 during hot reload #2438

niekvleeuwen opened this issue Mar 1, 2023 · 3 comments

Comments

@niekvleeuwen
Copy link

niekvleeuwen commented Mar 1, 2023

Hi all,

I am experiencing an exception that occurs during hot reloading. First, I thought this occurred because of my upgrade to Python 3.10, but after downgrading back to Python 3.9, the issue still occurs. However, the hot reloading itself seems to work fine.

dash                      2.8.1
dash-bootstrap-components 1.3.1
dash-core-components      2.0.0
dash-html-components      2.0.0
dash-table                5.0.0

My OS version is Windows

2023-03-01 12:00:54 INFO     Dash is running on http://localhost:8050/dashboard/

Dash is running on http://localhost:8050/dashboard/

 * Serving Flask app 'main'
 * Debug mode: on
Exception in thread Thread-2 (serve_forever):
Traceback (most recent call last):
  File "C:\Users\NiekLeeuwenvan\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\NiekLeeuwenvan\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\NiekLeeuwenvan\Code\pk-dashboard\venv\lib\site-packages\werkzeug\serving.py", line 766, in serve_forever
    super().serve_forever(poll_interval=poll_interval)
  File "C:\Users\NiekLeeuwenvan\AppData\Local\Programs\Python\Python310\lib\socketserver.py", line 232, in serve_forever
    ready = selector.select(poll_interval)
  File "C:\Users\NiekLeeuwenvan\AppData\Local\Programs\Python\Python310\lib\selectors.py", line 324, in select
    r, w, _ = self._select(self._readers, self._writers, [], timeout)
  File "C:\Users\NiekLeeuwenvan\AppData\Local\Programs\Python\Python310\lib\selectors.py", line 315, in _select
    r, w, x = select.select(r, w, w, timeout)
OSError: [WinError 10038] An operation was attempted on something that is not a socket

I am running the Dash application using the default example:

if __name__ == '__main__':
    app.run_server(debug=True, host='localhost')

Please let me know if this issue is better suited for the Werkzeug issue tracker.

@niekvleeuwen
Copy link
Author

During my upgrade to Python 3.10, I reinstalled my virtual environment, which caused Werkzeug 2.2.3 to be installed. Downgrading to Werkzeug 2.2.2 fixes the issue. I created an issue over at the Werkzeug issue tracker.

@savvn001
Copy link

savvn001 commented Oct 7, 2024

Same issue, tried downgrading, this solves the error message in OP but hot reload is not working at all. Did you find this too?

@niekvleeuwen
Copy link
Author

@savvn001 I can't remember for sure, but I think the reloading was working correctly after downgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants