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

AttributeError in url_path_join() when saving notebook #311

Closed
marcelo-rf opened this issue Aug 10, 2020 · 3 comments · Fixed by #334
Closed

AttributeError in url_path_join() when saving notebook #311

marcelo-rf opened this issue Aug 10, 2020 · 3 comments · Fixed by #334
Assignees
Labels
Milestone

Comments

@marcelo-rf
Copy link

Description

What steps will reproduce the problem?

Issue reporter is pulled up when I try to save any Jupyter notebook using Anaconda 3, Spyder 4, Python 3.7.3, and the Kite plugin

Traceback

  File "M:\Users\Marcelo\Anaconda3\lib\site-packages\spyder_notebook\widgets\notebooktabwidget.py", line 214, in close_client
    client.shutdown_kernel()
  File "M:\Users\Marcelo\Anaconda3\lib\site-packages\spyder_notebook\widgets\client.py", line 312, in shutdown_kernel
    kernel_id = self.get_kernel_id()
  File "M:\Users\Marcelo\Anaconda3\lib\site-packages\spyder_notebook\widgets\client.py", line 281, in get_kernel_id
    sessions_url = self.get_session_url()
  File "M:\Users\Marcelo\Anaconda3\lib\site-packages\spyder_notebook\widgets\client.py", line 272, in get_session_url
    return self.add_token(url_path_join(self.server_url, 'api/sessions'))
  File "M:\Users\Marcelo\Anaconda3\lib\site-packages\notebook\utils.py", line 50, in url_path_join
    initial = pieces[0].startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

Versions

  • Spyder version: 4.1.4
  • Python version: 3.7.3
  • Qt version: 5.12.9
  • PyQt5 version: 5.12.3
  • Operating System: Windows 10

Dependencies


# Mandatory:
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.5.0 (OK)
diff_match_patch >=20181111    :  20200713 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.17.0 (OK)
jedi =0.17.1                   :  0.17.1 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  1.1.0 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.7.0                   :  0.7.0 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=1.0                   :  2.5.3 (OK)
pyls >=0.34.0;<1.0.0           :  0.34.1 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.2 (OK)
qtconsole >=4.6.0              :  4.7.5 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
rtree >=0.8.3                  :  0.9.4 (OK)
sphinx >=0.6.6                 :  3.2.0 (OK)
spyder_kernels >=1.9.2;<1.10.0 :  1.9.3 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  19.0.1 (OK)

# Optional:
cython >=0.21                  :  0.29.21 (OK)
matplotlib >=2.0.0             :  3.2.2 (OK)
numpy >=1.7                    :  1.19.1 (OK)
pandas >=0.13.1                :  1.1.0 (OK)
scipy >=0.17.0                 :  1.5.0 (OK)
sympy >=0.7.3                  :  1.6.1 (OK)

# Spyder plugins:
spyder_notebook                :  0.3.0 (OK)
@ccordoba12 ccordoba12 transferred this issue from spyder-ide/spyder Aug 10, 2020
@jitseniesen
Copy link
Member

@marcelo-rf Thanks for your report. Did Spyder actually save the notebook? Does this problem persist after a restart?

@jitseniesen jitseniesen changed the title Jupyter notebook AttributeError in url_path_join() when saving notebook Aug 11, 2020
@marcelo-rf
Copy link
Author

Hi @jitseniesen, thanks for the quick response. Yes, Spyder did save the notebook. And I had tried to restart Spyder before trying again.

I tried it again today and, for some reason, I was able to save the notebook and run it without any issues.

I am sorry, but I have no idea what has changed since I last tried.

@jitseniesen
Copy link
Member

Thanks, I am happy to hear that the notebook was in fact saved. I think it is safe to ignore the error; I will change the plugin so that the issue reporter does not come up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants