spyder-notebook icon indicating copy to clipboard operation
spyder-notebook copied to clipboard

Cannot open notebook on other drive

Open dkhokhlov opened this issue 4 years ago • 6 comments

Description

What steps will reproduce the problem?

  1. create notebook on network drive using jupyter-notebook
  2. in Spyder open the created notebook in "Notebook" tab

Observed: Error This site can't be reached localhost refused connect.

Note: if the same notebook is placed on local drive - it works as usual.

Versions

  • Spyder version: 3.3.6
  • Python version: 3.7.3
  • Qt version: 5.12.4
  • PyQt5 version: 5.12.3
  • Operating System: Windows 7

Dependencies

pyflakes >=0.6.0  :  2.1.1 (OK)
pycodestyle >=2.3 :  2.5.0 (OK)
pygments >=2.0    :  2.4.2 (OK)
sphinx >=0.6.6    :  2.1.2 (OK)
rope >=0.9.4      :  0.14.0 (OK)
jedi >=0.9.0      :  0.13.3 (OK)
nbconvert >=4.0   :  5.5.0 (OK)
pandas >=0.13.1   :  0.24.2 (OK)
numpy >=1.7       :  1.16.4 (OK)
sympy >=0.7.3     :  1.4 (OK)
cython >=0.21     :  0.29.12 (OK)
qtconsole >=4.2.0 :  4.5.2 (OK)
IPython >=4.0     :  7.6.1 (OK)
matplotlib >=2.0.0:  3.1.0 (OK)
pylint >=0.25     :  2.3.1 (OK)

dkhokhlov avatar Aug 13 '19 06:08 dkhokhlov

We'll come back to fix several bugs in this plugin after we release Spyder 4.

ccordoba12 avatar Aug 13 '19 07:08 ccordoba12

It seems that this issue occurs when the notebook is not below the notebook path of the notebook server.

This even happens when c.NotebookApp.notebook_dir is set in jupyter_notebook_config.py... on my Windows machine Spyder ends up launching two servers, one in C:\Users\<username> (maybe because of the untitled0 default notebook?) and a second one in the notebook_dir. But the notebook plugin ends up using the first server, hence the error.

phausamann avatar Oct 31 '19 13:10 phausamann

Hello, I have had a similar problem. I start Spyder and it seems that notebook starts in my home folder (Windows os). When I try to open a file in another drive the error "localhost refused connect" appeared. After copying and pasting the file in test locations (firstly in home directory and then in C:) the problem disappeared.

Edit: The problem changed to permission denied when saving changes to the notebook. When closing the notebook the following warning displays:

Spyder could not get a list of sessions from the jupyter notebook server. Message: Forbidden.

Nikos-T avatar Apr 14 '20 16:04 Nikos-T

@Nikos-T Thank you for confirming the issue and giving additional information. I don't normally use Windows so any information which narrows the problem down further would be helpful.

Could you please list the versions of Spyder and spyder-notebook? Are you using Windows 10? And can you test whether it is possible to open the notebook on a network drive using Jupyter directly, outside of Spyder?

The problem changed to permission denied when saving changes to the notebook.

Is this when you open the notebook in a "good" location (home folder or C: drive) and then try to save it in the same location?

jitseniesen avatar Apr 15 '20 08:04 jitseniesen

Yes I am using windows 10. From conda list:

Name Version Build Channel
spyder 4.1.2 py37_0
spyder-kernels 1.9.0 py37_0
spyder-notebook 0.2.3 pyh9f0ad1d_0 spyder-ide
jupyter 1.0.0 py37_7
jupyter_client 6.1.2 py_0
jupyter_console 6.1.0 py_0
jupyter_core 4.6.3 py37_0
jupyterlab 1.2.6 pyhf63ae98_0
jupyterlab_server 1.1.0 py_0

Actually today I was not able to reproduce the problem. The desirable to edit files, opened from beginning and saving works correctly. In the meantime:

  1. a windows update was installed, but I doubt that that fixed the problem.
  2. I opened jupyter notebook from anaconda prompt (conda base environment)

I also should mention that I use a virtual environment for project in spyder (spyder still runs as is but python interpreter is loaded from elsewhere). I suppose there was a problem on my end and opening jupyter from anaconda prompt fixed it?

Nikos-T avatar Apr 15 '20 11:04 Nikos-T

Hello, I am getting the same issue today.

spyder version: 5.4.5 spyder-notebook version: 0.5.1 python version: 3.11.5

I am using Windows 10 and I installed in a venv.

I have tried installing in a new virtual environment, but still getting the error.

I have uninstalled and reinstalled spyder, spyder-notebook, notebook and jupyter-lab.

devinek-ppb avatar Oct 10 '23 09:10 devinek-ppb