jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.04k stars 341 forks source link

PyQt5 issue #369

Closed GerardoLopez closed 3 years ago

GerardoLopez commented 5 years ago

I'm using tljh and it's working nicely. I've a few notebooks that requires some user input, e.g. selecting an output directory. I'm using PyQt5 to open a QFileDialog:

from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QFileDialog

app = QtWidgets.QApplication([dir])

When running this, I've got the following message:

Kernel Restarting

The kernel appears to have died. It will restart automatically.

I guess it's a configuration issue but I'm not really sure. Questions are, is it an issue with PyQt5 and tljh? or just a particular config setting?

yuvipanda commented 5 years ago

@GerardoLopez thanks for opening this issue! You might be able to get more information by looking at the user's logs (http://tljh.jupyter.org/en/latest/troubleshooting/logs.html has info on how to do that).

Qt is a desktop application, and unless you are running TLJH on your local desktop, it won't work on JupyterHub since it is accessed through the web. There might be more web-native ways to accomplish what you want, such as ipywidgets. I don't know enough about PyQt to say more though.