Skip to content
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

Shut down results in errors in vscode jupyter notebook #786

Closed
Fred-Wu opened this issue Aug 3, 2023 · 4 comments
Closed

Shut down results in errors in vscode jupyter notebook #786

Fred-Wu opened this issue Aug 3, 2023 · 4 comments

Comments

@Fred-Wu
Copy link

Fred-Wu commented Aug 3, 2023

I am running dtale from a vscode jupyter notebook on my MacOS M1 .

When I tried to shutdown an instance, the following error appeared in both cell output or browser no matter whether open_browser was set true or not.


Internal Server Error

Error:

500 Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Stacktrace:

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensor-macos/lib/python3.11/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensor-macos/lib/python3.11/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensor-macos/lib/python3.11/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensor-macos/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensor-macos/lib/python3.11/site-packages/dtale/app.py", line 440, in shutdown
    shutdown_server()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensor-macos/lib/python3.11/site-packages/dtale/app.py", line 426, in shutdown_server
    raise RuntimeError("Not running with the Werkzeug Server")
RuntimeError: Not running with the Werkzeug Server


@aschonfeld
Copy link
Collaborator

@Fred-Wu how was D-Tale started in your notebook? Did you use JUPYTER_SERVER_PROXY?

@Fred-Wu
Copy link
Author

Fred-Wu commented Aug 3, 2023

I am just using it through standard jupyter notebook in vscode, no specific server setting was made.

image

Then shutting down results in

image

@aschonfeld
Copy link
Collaborator

@Fred-Wu so I found the issue. Looks like the latest versions of Werkzeug have deprecated the werkzeug.server.shutdown function (as described here)

I'm going to continue digging to see if there is a different way to kill the server, but for now I think it should get killed when you end the jupyter notebook.

aschonfeld added a commit that referenced this issue Aug 4, 2023
aschonfeld added a commit that referenced this issue Aug 4, 2023
aschonfeld added a commit that referenced this issue Aug 4, 2023
aschonfeld added a commit that referenced this issue Aug 10, 2023
aschonfeld added a commit that referenced this issue Aug 10, 2023
aschonfeld added a commit that referenced this issue Aug 15, 2023
aschonfeld added a commit that referenced this issue Aug 18, 2023
aschonfeld added a commit that referenced this issue Aug 18, 2023
aschonfeld added a commit that referenced this issue Aug 22, 2023
aschonfeld added a commit that referenced this issue Aug 22, 2023
aschonfeld added a commit that referenced this issue Aug 22, 2023
aschonfeld added a commit that referenced this issue Aug 22, 2023
aschonfeld added a commit that referenced this issue Aug 22, 2023
aschonfeld added a commit that referenced this issue Aug 22, 2023
aschonfeld added a commit that referenced this issue Aug 22, 2023
aschonfeld added a commit that referenced this issue Aug 23, 2023
aschonfeld added a commit that referenced this issue Aug 23, 2023
@aschonfeld
Copy link
Collaborator

@Fred-Wu I've fixed this issue in v3.5.0 of D-Tale. It's available on pypi and conda-forge. Let me know if you have any issues.

Also, if you haven't already, please put your ⭐ on the repo when you get a sec. Thanks! 🙏

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