These are chat archives for ipython/ipython

29th
Mar 2015
Nicholas Bollweg
@bollwyvl
Mar 29 2015 13:47
anyone have any suggestions as to how to get an installed kernel to show up in the version of ipython run by JSTestController? I used to install it very manually, but really want to use install_kernel_spec...
Sylvain Corlay
@SylvainCorlay
Mar 29 2015 17:31
never tried.
git is really getting unresponsive
Nicholas Bollweg
@bollwyvl
Mar 29 2015 17:32
yes: ddos still, i imagine...
also: re kernels:
got it working:
def setup_assets(user=False, ipython_dir=None):
    # Now write the kernelspec
    from IPython.kernel.kernelspec import (
        KernelSpecManager,
        install_kernel_spec,
    )

    if ipython_dir is None:
        install = install_kernel_spec
    else:
        ksm = KernelSpecManager(ipython_dir=ipython_dir)
        install = ksm.install_kernel_spec

    install(
        join(pkgroot, 'assets'),
        'hy',
        replace=True,
        user=user
    )
although letting install_kernel_spec take ipython_dir might be nice...
Sylvain Corlay
@SylvainCorlay
Mar 29 2015 17:35
thanks for the example!
I hope it will git better!
Nicholas Bollweg
@bollwyvl
Mar 29 2015 17:35
:clap:
Antonino Ingargiola
@tritemio
Mar 29 2015 17:54
Hi, I just got an error in a notebook running ipython 3 on windows (anaconda).
I was working on a notebook for 1h when a dialog asking to overwrite the notebook changes appeared.
Then a yellow error appeared on the top bar:
Unexpected error while saving the file: ...
I decide to make a copy to see what I had saved so far, but the copy failed (the new tab opened and closed right away)
And a new error appeared saying something similar to File not found
The first error had the error code [183], but I lost the last part of the massage (I couldn't copy it)
Antonino Ingargiola
@tritemio
Mar 29 2015 17:59
now, while writing this the errors disappeared.
Now I can manually save the notebook without error, but for a few minutes, even a manual save was triggering the first error that I mentioned.
Antonino Ingargiola
@tritemio
Mar 29 2015 21:17
Moreover now I have 20-ish folders with the same name of the notebooks that gave error and a random suffix. Each folder contains a notebook.
This is the second time these folders appear. Is it normal? Are this just temporary files that I can safely delete?
Min RK
@minrk
Mar 29 2015 21:33
@tritemio are these local files, or a network-mounted filesystem?
Min RK
@minrk
Mar 29 2015 21:47
Can you share the server logs from when this is happening?
Matthias Bussonnier
@Carreau
Mar 29 2015 22:06
Min RK
@minrk
Mar 29 2015 22:07
Yikes, that's horrifying.
Antonino Ingargiola
@tritemio
Mar 29 2015 22:28
@minrk these a local files, in a single desktop configuration
[I 11:00:10.328 NotebookApp] Saving file at /voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
[I 11:00:12.400 NotebookApp] Saving file at /voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
[E 11:00:14.206 NotebookApp] Error while saving file: voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb [Error 183] Cannot create a file when that file already exists
    Traceback (most recent call last):
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\html\services\contents\filemanager.py", line 384, in save
        self._save_notebook(os_path, nb)
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\html\services\contents\fileio.py", line 116, in _save_notebook
        nbformat.write(nb, f, version=nbformat.NO_CONVERT)
      File "C:\Users\laser2002j\Anaconda\lib\contextlib.py", line 24, in __exit__
        self.gen.next()
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\html\services\contents\fileio.py", line 57, in atomic_writing
        yield f
      File "C:\Users\laser2002j\Anaconda\lib\contextlib.py", line 24, in __exit__
        self.gen.next()
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\utils\io.py", line 302, in atomic_writing
        os.rename(tmp_path, path)
    WindowsError: [Error 183] Cannot create a file when that file already exists
[W 11:00:14.207 NotebookApp] Unexpected error while saving file: voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb [Error 183] Cannot create a file when that file already exists
[E 11:00:14.207 NotebookApp] {
      "Content-Length": "16509278",
      "Accept-Language": "en-US,en;q=0.5",
      "Accept-Encoding": "gzip, deflate",
      "Connection": "keep-alive",
      "Accept": "application/json, text/javascript, */*; q=0.01",
      "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0",
      "Host": "localhost:8888",
      "X-Requested-With": "XMLHttpRequest",
      "Referer": "http://localhost:8888/notebooks/voltagesensing/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb",
      "Content-Type": "application/json; charset=UTF-8"
    }
[E 11:00:14.207 NotebookApp] 500 PUT /api/contents/voltagesensing/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb (::1) 12575.00ms referer=http://localhost:8888/notebooks/voltagesensing/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb
[I 11:00:14.378 NotebookApp] Uploading file to /voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
[I 11:00:16.438 NotebookApp] Saving file at /voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
[I 11:00:18.542 NotebookApp] Saving file at /voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
Min RK
@minrk
Mar 29 2015 22:30
Hm. Do you have the same file opened in multiple tabs/windows?
It looks like there are multiple concurrent attempts to save the same file. That might cause problems.
Antonino Ingargiola
@tritemio
Mar 29 2015 22:32
I have several of those errors in my terminal log.
@minrk I'm quite sure I had only one tab open
Antonino Ingargiola
@tritemio
Mar 29 2015 22:44
if it can help here another chunk of log showing 404 GET error:
[W 10:51:54.102 NotebookApp] No such file or directory: voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
[W 10:51:54.102 NotebookApp] 404 GET /api/contents/voltagesensing/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb?content=0&_=1427647183131 (::1) 1.00ms referer=http://localhost:8888/notebooks/voltagesensing
/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb
[I 10:51:54.322 NotebookApp] Uploading file to /voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
[E 10:51:56.042 NotebookApp] Error while saving file: voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb [Error 183] Cannot create a file when that file already exists
    Traceback (most recent call last):
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\html\services\contents\filemanager.py", line 384, in save
        self._save_notebook(os_path, nb)
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\html\services\contents\fileio.py", line 116, in _save_notebook
        nbformat.write(nb, f, version=nbformat.NO_CONVERT)
      File "C:\Users\laser2002j\Anaconda\lib\contextlib.py", line 24, in __exit__
        self.gen.next()
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\html\services\contents\fileio.py", line 57, in atomic_writing
        yield f
      File "C:\Users\laser2002j\Anaconda\lib\contextlib.py", line 24, in __exit__
        self.gen.next()
      File "C:\Users\laser2002j\Anaconda\lib\site-packages\IPython\utils\io.py", line 302, in atomic_writing
        os.rename(tmp_path, path)
    WindowsError: [Error 183] Cannot create a file when that file already exists
[W 10:51:56.043 NotebookApp] Unexpected error while saving file: voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb [Error 183] Cannot create a file when that file already exists
[E 10:51:56.045 NotebookApp] {
      "Content-Length": "16509278",
      "Accept-Language": "en-US,en;q=0.5",
      "Accept-Encoding": "gzip, deflate",
      "Connection": "keep-alive",
      "Accept": "application/json, text/javascript, */*; q=0.01",
      "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0",
      "Host": "localhost:8888",
      "X-Requested-With": "XMLHttpRequest",
      "Referer": "http://localhost:8888/notebooks/voltagesensing/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb",
      "Content-Type": "application/json; charset=UTF-8"
    }
[E 10:51:56.045 NotebookApp] 500 PUT /api/contents/voltagesensing/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb (::1) 1854.00ms referer=http://localhost:8888/notebooks/voltagesensing/Patch%20Clamp%20Analys
is%20-%20Phase%20offset-take1.ipynb
[W 10:53:54.108 NotebookApp] No such file or directory: voltagesensing/Patch Clamp Analysis - Phase offset-take1.ipynb
[W 10:53:54.108 NotebookApp] 404 GET /api/contents/voltagesensing/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb?content=0&_=1427647183132 (::1) 0.00ms referer=http://localhost:8888/notebooks/voltagesensing
/Patch%20Clamp%20Analysis%20-%20Phase%20offset-take1.ipynb
Min RK
@minrk
Mar 29 2015 23:00
What is os.name?
Min RK
@minrk
Mar 29 2015 23:10
It's peculiar that os.rename is seeing an existing file, because the line immediately before that, the target file is removed if it exists.