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

Deleting disconnected kernels fails #43

Closed
caleblf opened this issue Sep 11, 2019 · 2 comments · Fixed by #44
Closed

Deleting disconnected kernels fails #43

caleblf opened this issue Sep 11, 2019 · 2 comments · Fixed by #44

Comments

@caleblf
Copy link
Contributor

caleblf commented Sep 11, 2019

When disconnecting from an appmode app (e.g. by closing the browser window), the request to delete the kernel fails (500 DELETE) with TypeError: '_asyncio.Future' object is not subscriptable in server_extension.AppmodeHandler.delete, line 97.

As of notebook versions 4.2 and 5.7, respectively, SessionManager.get_session and SessionManager.delete_session are both coroutines and should be awaited.

This issue causes old kernels to keep running, consuming server resources.

I'm seeing this issue in appmode 0.6.0 with Python 3.6.7, notebook 6.0.0, ipython 7.7.0, tornado 6.0.3.

@oschuett
Copy link
Owner

Thanks for reporting! I guess, we should use inspect.iscoroutinefunction to retain backwards compatibility. Do you want to create a pull request to fix this?

@caleblf
Copy link
Contributor Author

caleblf commented Sep 13, 2019

Sure. I tried that fix locally (except tornado's equivalent to iscoroutinefunction was needed), and it works for me! I'll make a PR.

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

Successfully merging a pull request may close this issue.

2 participants