spyder-ide / spyder-notebook

Jupyter notebook integration with Spyder
Other
531 stars 130 forks source link

Notebook tab not showing anything #388

Closed sancho-s closed 1 year ago

sancho-s commented 1 year ago

Description of your problem

What steps will reproduce the problem?

  1. Install python3, virtualenv, python3-pip, python3-dev via apt, see my packages below, only a few are listed. This is a minor departure from this, no upgrade of pip, and virtualenv installed via apt instead of pip3.
  2. Create a virtualenv
  3. Install spyder + jupyter via pip
  4. Launch spyder, see below
  5. Switch to tab Notebook
  6. Open an existing notebook, or create a new one

For item 1 above

$ dpkg -l | grep python3
ii  python3                                       3.10.6-1~22.04                          amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-dev                                   3.10.6-1~22.04                          amd64        header files and a static library for Python (default)
ii  python3.10                                    3.10.6-1~22.04.1                        amd64        Interactive high-level object-oriented language (version 3.10)
ii  python3.10-dev                                3.10.6-1~22.04.1                        amd64        Header files and a static library for Python (v3.10)
ii  python3.10-minimal                            3.10.6-1~22.04.1                        amd64        Minimal subset of the Python language (version 3.10)
ii  python3-pip                                   22.0.2+dfsg-1                           all          Python package installer
$ dpkg -l | grep virtualenv
ii  python3-virtualenv                            20.13.0+ds-2                            all          Python virtual environment creator

For items 2-4 above:

virtualenv spyder
source spyder/bin/activate
pip install jupyter spyder
pip install spyder-notebook
pip install jupyterlab
pip install notebook
pip install nbconvert
pip install voila
spyder &

What is the expected output? What do you see instead?

Expected output: A notebook where I can enter code

What I see: An empty screen with no way of entering anything

Please provide any additional information below (stack trace, screenshots, a gif, etc)

In Three dashes menu -> Server info (Notebook server info):

No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect. 
[W 2022-11-17 15:58:36.430 LabApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2022-11-17 15:58:36.430 LabApp] 'password' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2022-11-17 15:58:36.436 LabApp] JupyterLab extension loaded from /home/santiago/Documents/soft-hard-ware/python/envs/spyder/spyder/lib/python3.10/site-packages/jupyterlab
[I 2022-11-17 15:58:36.436 LabApp] JupyterLab application directory is /home/user1/Documents/soft-hard-ware/python/envs/spyder/spyder/share/jupyter/lab
[I 15:58:36.525 SpyderNotebookServer] Serving notebooks from local directory: /tmp/spyder-user1/notebooks
[I 15:58:36.525 SpyderNotebookServer] Jupyter Notebook 6.5.2 is running at:
[I 15:58:36.525 SpyderNotebookServer] http://localhost:8888/?token=173564737e999d60998a362def73788fab59e6c93fe6e3f8
[I 15:58:36.525 SpyderNotebookServer]  or http://127.0.0.1:8888/?token=173564737e999d60998a362def73788fab59e6c93fe6e3f8
[I 15:58:36.525 SpyderNotebookServer] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:58:36.527 SpyderNotebookServer] 

    To access the notebook, open this file in a browser:
        file:///home/user1/.local/share/jupyter/runtime/nbserver-4275-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=173564737e999d60998a362def73788fab59e6c93fe6e3f8
     or http://127.0.0.1:8888/?token=173564737e999d60998a362def73788fab59e6c93fe6e3f8

When loading file:///home/user1/.local/share/jupyter/runtime/nbserver-4275-open.html in firefox:

image

Versions and main components

Dependencies

Please go to the menu entry Help > Optional Dependencies (or Help > Dependencies), press the button Copy to clipboard and paste the contents below:

Mandatory:

atomicwrites >=1.2.0 : 1.4.1 (OK) chardet >=2.0.0 : 5.0.0 (OK) cloudpickle >=0.5.0 : 2.2.0 (OK) cookiecutter >=1.6.0 : 2.1.1 (OK) diff_match_patch >=20181111 : 20200713 (OK) intervaltree >=3.0.2 : 3.1.0 (OK) IPython >=7.31.1;<8.0.0 : 7.34.0 (OK) jedi >=0.17.2;<0.19.0 : 0.18.1 (OK) jellyfish >=0.7 : 0.9.0 (OK) jsonschema >=3.2.0 : 4.17.0 (OK) keyring >=17.0.0 : 23.11.0 (OK) nbconvert >=4.0 : 7.2.5 (OK) numpydoc >=0.6.0 : 1.5.0 (OK) parso >=0.7.0;<0.9.0 : 0.8.3 (OK) pexpect >=4.4.0 : 4.8.0 (OK) pickleshare >=0.4 : 0.7.5 (OK) psutil >=5.3 : 5.9.4 (OK) pygments >=2.0 : 2.13.0 (OK) pylint >=2.5.0;<3.0 : 2.15.5 (OK) pylint_venv >=2.1.1 : 2.3.0 (OK) pyls_spyder >=0.4.0 : 0.4.0 (OK) pylsp >=1.6.0;<1.7.0 : 1.6.0 (OK) pylsp_black >=1.2.0 : 1.2.1 (OK) qdarkstyle >=3.0.2;<3.1.0 : 3.0.3 (OK) qstylizer >=0.2.2 : 0.2.2 (OK) qtawesome >=1.2.1 : 1.2.1 (OK) qtconsole >=5.4.0;<5.5.0 : 5.4.0 (OK) qtpy >=2.1.0 : 2.3.0 (OK) rtree >=0.9.7 : 1.0.1 (OK) setuptools >=49.6.0 : 59.6.0 (OK) sphinx >=0.6.6 : 5.3.0 (OK) spyder_kernels >=2.4.0;<2.5.0 : 2.4.0 (OK) textdistance >=4.2.0 : 4.5.0 (OK) three_merge >=0.1.1 : 0.1.1 (OK) watchdog >=0.10.3 : 2.1.9 (OK) xdg >=0.26 : 0.28 (OK) zmq >=22.1.0 : 24.0.1 (OK)

Optional:

cython >=0.21 : None (NOK) matplotlib >=3.0.0 : None (NOK) numpy >=1.7 : None (NOK) pandas >=1.1.1 : None (NOK) scipy >=0.17.0 : None (NOK) sympy >=0.7.3 : None (NOK)

Spyder plugins:

spyder_notebook.notebookplugin 0.4.0 : 0.4.0 (OK)

ccordoba12 commented 1 year ago

Hey @sancho-s, thanks for reporting. I think the notebook should be displayed correctly if you go to this

http://localhost:8888/?token=173564737e999d60998a362def73788fab59e6c93fe6e3f8

or this

http://127.0.0.1:8888/?token=173564737e999d60998a362def73788fab59e6c93fe6e3f8

address, but I'm not really sure.

ccordoba12 commented 1 year ago

I'm going to close this issue as a duplicate of #386 because they are basically the same. As I said there, at the moment we don't know why it happens, sorry.

ccordoba12 commented 1 year ago

If you have additional info or manage to solve this problem, please post your comments on #386.