Closed schmoelder closed 1 year ago
Hey @schmoelder, thanks for reporting. A couple of comments:
spyder_okvim.spyder.plugin
and try again. Perhaps there's a conflict between the two.Please go to this entry in the File menu
and select Verbose
:
After Spyder restarts, go to the Tools > Debug logs
menu
open spyder-debug.log
and upload it here.
Hey @ccordoba12, thanks so much for investigating this.
Please uninstall this plugin spyder_okvim.spyder.plugin and try again. Perhaps there's a conflict between the two.
I did, unfortunately, that didn't help.
open spyder-debug.log and upload it here.
Here you go: https://gist.github.com/schmoelder/bcfa4366fd68493573cee9eb9826c80e
If there is anything else I can do, please let me know! :)
I don't see anything wrong in the logs. The notebook server is started as it should. Here are some more things you can try:
/home/jo/software/miniconda3/envs/chromapy/lib/python3.9/site-packages/spyder_notebook/server/main.py --no-browser --notebook-dir=/tmp/spyder-jo/notebooks --NotebookApp.password= KernelSpecManager.kernel_spec_class=spyder.plugins.ipythonconsole.utils.kernelspec.SpyderKernelSpec --dark
Run this command from the command line inside the chromapy environment and look for errors. One of the messages should give you a URL; open that in a web browser and make sure that it works.
Hi, just did a clean installation of
conda install spyder-notebook -c conda-forge
Install Spyder and the spyder-notebook plugin in a fresh environment.
I created a clean (spyder
) environment, the issue still persists.
Go to the options menu of the Notebook pane (this is the button with three horizontal lines in the upper right corner) and click on "Server info". Look for error messages. The message "No QCoreApplication instance found" at the top of the log is harmless.
No Errors here. This is the entire output:
No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect.
[I 11:09:08.739 SpyderNotebookServer] Serving notebooks from local directory: /tmp/spyder-jo/notebooks
[I 11:09:08.740 SpyderNotebookServer] Jupyter Notebook 6.5.1 is running at:
[I 11:09:08.740 SpyderNotebookServer] http://localhost:8888/?token=223038de960f79d715d0be98a2716256265b583793348a11
[I 11:09:08.740 SpyderNotebookServer] or http://127.0.0.1:8888/?token=223038de960f79d715d0be98a2716256265b583793348a11
[I 11:09:08.740 SpyderNotebookServer] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:09:08.743 SpyderNotebookServer]
To access the notebook, open this file in a browser:
file:///home/jo/.local/share/jupyter/runtime/nbserver-859616-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=223038de960f79d715d0be98a2716256265b583793348a11
or http://127.0.0.1:8888/?token=223038de960f79d715d0be98a2716256265b583793348a11
2. According to the debug log, the notebook server is started with the command
/home/jo/software/miniconda3/envs/chromapy/lib/python3.9/site-packages/spyder_notebook/server/main.py --no-browser --notebook-dir=/tmp/spyder-jo/notebooks --NotebookApp.password= KernelSpecManager.kernel_spec_class=spyder.plugins.ipythonconsole.utils.kernelspec.SpyderKernelSpec --dark
Run this command from the command line inside the chromapy environment and look for errors. One of the messages should give you a URL; open that in a web browser and make sure that it works.
I did that (in my new clean spyder environment) and it crashes. This ist the output:
(spyder) jo@matebook:~$ /home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py --no-browser --notebook-dir=/tmp/spyder-jo/notebooks --NotebookApp.password= KernelSpecManager.kernel_spec_class=spyder.plugins.ipythonconsole.utils.kernelspec.SpyderKernelSpec --dark
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 4: Entry point for server rendering notebooks for Spyder.: Befehl nicht gefunden
import-im6.q16: attempt to perform an operation not allowed by the security policy `PS' @ error/constitute.c/IsCoderAuthorized/421.
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 7: from: Befehl nicht gefunden
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 8: from: Befehl nicht gefunden
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 9: from: Befehl nicht gefunden
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 10: from: Befehl nicht gefunden
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 11: from: Befehl nicht gefunden
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 13: Syntaxfehler beim unerwarteten Wort »(«
/home/jo/software/miniconda3/envs/spyder/lib/python3.9/site-packages/spyder_notebook/server/main.py: Zeile 13: `HERE = os.path.dirname(__file__)'
Unfortunately, it's in German. I could try to change the system language if that helps.
Thanks @dererumenergetica ,
following your procedure and properly updating the dependencies with
conda update anaconda
conda update spyder
in the terminal,
eventually worked for me!
I have seemingly the same issue. Namely, I get the notebook tab, but no notebook interface is visible there: From the verbose logs, I found the command that is (supposed to be?) run:
python /usr/lib/python3.10/site-packages/spyder_notebook/server/main.py --no-browser --notebook-dir=/tmp/spyder-equaeghe/notebooks --NotebookApp.password= --KernelSpecManager.kernel_spec_class=spyder.plugins.ipythonconsole.utils.kernelspec.SpyderKernelSpec
(I first did it without the python
in front, but the file is not executable.) Running this file results in
No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect.
[I 14:10:12.020 SpyderNotebookServer] Loading IPython parallel extension
[I 14:10:12.024 SpyderNotebookServer] De port 8888 is al in gebruik, proberen een andere port.
[I 14:10:12.025 SpyderNotebookServer] De port 8889 is al in gebruik, proberen een andere port.
[I 14:10:12.026 SpyderNotebookServer] Notebooks uit lokale map activeren: /tmp/spyder-equaeghe/notebooks
[I 14:10:12.026 SpyderNotebookServer] Jupyter Notebook 6.4.12 is running at:
[I 14:10:12.026 SpyderNotebookServer] http://localhost:8890/?token=14a22703c2edb3d9fd78b3c943292c07333e1027775ededb
[I 14:10:12.026 SpyderNotebookServer] or http://127.0.0.1:8890/?token=14a22703c2edb3d9fd78b3c943292c07333e1027775ededb
[I 14:10:12.026 SpyderNotebookServer] Gebruik Control-C om deze server te stoppen en sluit alle kernels af (twee keer om bevestiging over te slaan).
[C 14:10:12.031 SpyderNotebookServer]
To access the notebook, open this file in a browser:
file:///home/equaeghe/.local/share/jupyter/runtime/nbserver-54769-open.html
Or copy and paste one of these URLs:
http://localhost:8890/?token=14a22703c2edb3d9fd78b3c943292c07333e1027775ededb
or http://127.0.0.1:8890/?token=14a22703c2edb3d9fd78b3c943292c07333e1027775ededb
and the specified URL redirects to another page, we see a strange view, but there is something there:
What steps can I take to try and fix this issue?
@equaeghe, I think this problem could be due to permission errors caused because you installed Spyder and Spyder-notebook system-wide.
So, please create an isolated virtualenv in your home directory and install Spyder-notebook there. Perhaps that fixes the issue for you.
@equaeghe, I think this problem could be due to permission errors caused because you installed Spyder and Spyder-notebook system-wide.
So, please create an isolated virtualenv in your home directory and install Spyder-notebook there. Perhaps that fixes the issue for you.
I've tried to do this on Windows 11, and still no effect. I keep receiving a timeout error when I start spyder or try to open a notebook. Spyder, spyder-nodetbook, and jupyterlab are installed in the same venv. Python 3.11.
python -m venv spyder-ide
cd spyder-ide
Scripts\Activate.ps1
python -m pip install -U pip
pip install wheel
pip install spyder spyder-notebook
Then I get the following server info:
I also still have this issue, now on spyder 5.4.2
I do get some new output in the console, however. Don't know if it's related but maybe it helps:
/home/jo/software/miniconda3/envs/dev/lib/python3.10/site-packages/jupyter_client/threaded.py:73: RuntimeWarning: ZMQStream only supports the base zmq.Socket class.
Use zmq.Socket(shadow=other_socket)
or `ctx.socket(zmq.DEALER, socket_class=zmq.Socket)`
to create a base zmq.Socket object,
no matter what other kind of socket your Context creates.
self.stream = zmqstream.ZMQStream(self.socket, self.ioloop)
@schmoelder, that warning is unrelated to this problem. On Linux it could be related to issue https://github.com/spyder-ide/spyder/issues/20358.
So, I'd like to ask you: is the Help pane working for you as expected?
I ran into the same two related issues:
I started with a Miniconda 3.10 environment. Followed directions to install spyder like this:
conda create -c conda-forge -n spyder-env spyder numpy scipy pandas matplotlib sympy cython opencv spyder-notebook
The above appears to require an update of python to 3.11. I think this is what's causing the issues.
I setup the environment again. This time, without pointing to conda-forge:
conda create -n spyder-env spyder numpy scipy pandas matplotlib sympy cython opencv
Looks like python 3.10.9 remains. And spyder is the older version 5.3.3. And help pane works.
Then installed the notebook plugin from conda-forge:
conda install spyder-notebook -c conda-forge
Appears to work!
Now if I could only figure out how to get the debugger working in notebook... (maybe it's not supported yet)?
So, I'd like to ask you: is the Help pane working for you as expected?
Well, sort of. When I press CTRL + I in front of the object the help topic appears in the Help pane. But the Object search line doesn't work, it ignores any input I provide.
It takes place either with and without spyder-notebook and its depndecies installed.
UPD: tried on MacOS Monterrey in freshly created venv (Python 3.10.6, installed by Homebrew).
I've installed spyder and spyder-notebook via pip into the venv. Everything works as expected, both notepad and help pane.
In Windows 11 under venv help and notebook don't work. If installed system-wide help pane and notebooks work as expected.
@64kbyte, you said:
Now if I could only figure out how to get the debugger working in notebook... (maybe it's not supported yet)?
That use case is still not supported but we'll try to in the future.
Also, what's your operating system?
@d9d6ka, you said
In Windows 11 under venv help and notebook don't work. If installed system-wide help pane and notebooks work as expected.
That's very strange. What's your Python version?
Also, @dalthviz, could you check if Spyder-notebook is working for you if installed in a conda env on Windows?
@d9d6ka, you said
In Windows 11 under venv help and notebook don't work. If installed system-wide help pane and notebooks work as expected.
That's very strange. What's your Python version?
Well, I don't know, what happened, but help pane started working...
On my Windows machine Python 3.11.0 is installed. System-wide everything works. In venv notebook throws a timeout error.
I'll use a system-wide installed Spyder for now. Anyway thanks for this add-on, hope the source of the problem will be found.
Also, what's your operating system?
I'm on Ubuntu 22.04.
I dug a little deeper and played around with conda package versions. Looks the culprit may be in the interactions with the fontconfig package. A default install from the conda-forge channel will bring in fontconfig=2.14.2. I decided to try one version prior.
I made a fresh environment with:
conda create -c conda-forge -n pydev fontconfig=2.14.1 spyder spyder-notebook numpy scipy pandas matplotlib sympy cython opencv
Both help and notebook show up and are functional with Python 3.11 and spyder 5.4.2 and spyder-notebook 0.4.0.
Sorry, was afk yesterday...
So, I'd like to ask you: is the Help pane working for you as expected?
You're right, it's actually not working. Since I don't use it much, I had not noticed that.
Both help and notebook show up and are functional with Python 3.11 and spyder 5.4.2 and spyder-notebook 0.4.0.
I'm still on Python 3.10 but using spyder 5.4.2 and spyder-notebook 0.4.0 with fontconfig=2.14.1 (and 2.14.2 for that matter) did not solve the issue for me.
Also, @dalthviz, could you check if Spyder-notebook is working for you if installed in a conda env on Windows?
Tried creating a conda env (conda create -n spyder-notebook -c conda-forge python=3.10 spyder spyder-notebook
) but seems like is working for me. The env spec:
Also, seems like the Help pane is not working too, right? Maybe then the issue could be related with QWebEngine process not being able to launch from that specific non system-wide venv? Also, where is located the venv where things are not working? If it is located in a network drive maybe the issue could be related to https://bugreports.qt.io/browse/QTBUG-84632
Hey guys, I think this will be solved when we release Spyder 5.4.3 next month thanks to the fix in https://github.com/spyder-ide/spyder/pull/20482. That should solve the problems @schmoelder is having on Linux and @d9d6ka on Windows.
We'll let you know when that release is out so you can try Spyder-notebook again afterwards.
Fixed by #410
Description of your problem
I was very happy to read that a new version of spyder-notebooks was released and I immediately wanted to try it out. However, I could not get it to run.
What steps will reproduce the problem?
conda install spyder -c conda-forge
conda install spyder-notebook -c conda-forge
What is the expected output? What do you see instead?
I would expect the notebooks to show. However, I get a "blank" page (see screenshot below).
Please provide any additional information below (stack trace, screenshots, a gif, etc)
When I click on
Open a new Notebook
, a new tab appears which is also empty. If I try to open an existing notebook, nothing happens.I don't know if it helps but if I run
import spyder_notebook
, I get the following error:Versions and main components
Dependencies
# 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.0.2 (OK) IPython >=7.31.1;<8.0.0 : 7.33.0 (OK) jedi >=0.17.2;<0.19.0 : 0.18.1 (OK) jellyfish >=0.7 : 0.9.0 (OK) jsonschema >=3.2.0 : 3.2.0 (OK) keyring >=17.0.0 : 23.9.3 (OK) nbconvert >=4.0 : 6.5.3 (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.2 (OK) pygments >=2.0 : 2.13.0 (OK) pylint >=2.5.0;<3.0 : 2.15.3 (OK) pyls_spyder >=0.4.0 : 0.4.0 (OK) pylsp >=1.5.0;<1.6.0 : 1.5.0 (OK) pylsp_black >=1.2.0 : 1.2.1 (OK) qdarkstyle >=3.0.2;<3.1.0 : 3.0.3 (OK) qstylizer >=0.1.10 : 0.2.2 (OK) qtawesome >=1.0.2 : 1.1.1 (OK) qtconsole >=5.3.2;<5.4.0 : 5.3.2 (OK) qtpy >=2.1.0 : 2.2.1 (OK) rtree >=0.9.7 : 1.0.0 (OK) setuptools >=49.6.0 : 65.4.1 (OK) sphinx >=0.6.6 : 4.5.0 (OK) spyder_kernels >=2.3.3;<2.4.0 : 2.3.3 (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 : 0.29.32 (OK) matplotlib >=3.0.0 : 3.6.0 (OK) numpy >=1.7 : 1.23.3 (OK) pandas >=1.1.1 : 1.5.0 (OK) scipy >=0.17.0 : 1.9.1 (OK) sympy >=0.7.3 : 1.11.1 (OK)
# Spyder plugins: spyder_notebook.notebookplugin 0.4.0 : 0.4.0 (OK) spyder_okvim.spyder.plugin 0.0.1.dev0 : 0.0.1-dev0 (OK)