[IPython-User] "Error connecting to server" with IPython notebook in one particular directory

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[IPython-User] "Error connecting to server" with IPython notebook in one particular directory

Richard Stanton

I’ve been using IPython notebook with the Anaconda distribution on both OS X and Windows for quite some while. Mostly, everything runs without a hitch on both systems. If I type “ipython notebook”, my browser pops up with a list of ipynb files in the current directory, and off I go.

 

However, there’s one of my project directories where this doesn’t work. It’s fine on my Mac, but on the Windows machine, in this one directory (it works fine in other directories), the browser window shows no files (even though there are a number of notebook files there). Instead, it shows just the root (“/”), and on the line after this is the text “Error connecting to server”. In the command shell running the server, this is what I see:

 

2014-09-07 00:00:33.328 [NotebookApp] Serving notebooks from local directory: C:

\projects\ESOest

2014-09-07 00:00:33.328 [NotebookApp] 0 active kernels

2014-09-07 00:00:33.328 [NotebookApp] The IPython Notebook is running at: http:/

/localhost:8888/

2014-09-07 00:00:33.329 [NotebookApp] Use Control-C to stop this server and shut

down all kernels (twice to skip confirmation).

2014-09-07 00:00:33.875 [NotebookApp] ERROR | Unhandled error in API request

Traceback (most recent call last):

  File "C:\anaconda\lib\site-packages\IPython\html\base\handlers.py", line 332,

in wrapper

    result = method(self, *args, **kwargs)

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\handlers.p

y", line 78, in get

    for nb in nbm.list_notebooks(path):

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana

ger.py", line 235, in list_notebooks

    for name in notebook_names if self.should_list(name)]

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana

ger.py", line 262, in get_notebook

    created = tz.utcfromtimestamp(info.st_ctime)

  File "C:\anaconda\lib\site-packages\IPython\utils\tz.py", line 41, in utc_meth

od

 

    dt = unaware(*args, **kwargs)

ValueError: timestamp out of range for platform localtime()/gmtime() function

ERROR:tornado.access:{

  "Accept-Language": "en-US,en;q=0.8",

  "Accept-Encoding": "gzip,deflate,sdch",

  "Connection": "keep-alive",

  "Accept": "application/json, text/javascript, */*; q=0.01",

  "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML,

like Gecko) Chrome/36.0.1985.143 Safari/537.36",

  "Dnt": "1",

  "Host": "localhost:8888",

  "X-Requested-With": "XMLHttpRequest",

  "Referer": "http://localhost:8888/tree"

}

 

ERROR:tornado.access:500 GET /api/notebooks?_=1410073425115 (::1) 19.00ms refere

r=http://localhost:8888/tree

 

Any idea what’s going wrong? By the way, I’m currently using anaconda 2.0.1 with IPython 2.2.0 (the latest versions installed by anaconda), but I’ve seen this problem for a while, so I don’t think it’s just this version of IPython that’s the problem.

 

Again, “ipython notebook” runs fine in every other directory I’ve tried on the same machine.

 

Thanks for any suggestions.

 

Richard Stanton


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Error connecting to server" with IPython notebook in one particular directory

Thomas Kluyver-2
It looks like there's a file in there with a strange ctime (creation time).  Can you investigate what that is? Try calling os.stat(filename).st_ctime on each file in that directory.

By the way, we're gradually deprecating ipython-user and merging discussion into ipython-dev, so you might prefer to ask questions there in the future. We also have a chat room, and we monitor the ipython tag on Stackoverflow for questions.

Best wishes,
Thomas

On 7 September 2014 00:08, Richard Stanton <[hidden email]> wrote:

I’ve been using IPython notebook with the Anaconda distribution on both OS X and Windows for quite some while. Mostly, everything runs without a hitch on both systems. If I type “ipython notebook”, my browser pops up with a list of ipynb files in the current directory, and off I go.

 

However, there’s one of my project directories where this doesn’t work. It’s fine on my Mac, but on the Windows machine, in this one directory (it works fine in other directories), the browser window shows no files (even though there are a number of notebook files there). Instead, it shows just the root (“/”), and on the line after this is the text “Error connecting to server”. In the command shell running the server, this is what I see:

 

2014-09-07 00:00:33.328 [NotebookApp] Serving notebooks from local directory: C:

\projects\ESOest

2014-09-07 00:00:33.328 [NotebookApp] 0 active kernels

2014-09-07 00:00:33.328 [NotebookApp] The IPython Notebook is running at: http:/

/localhost:8888/

2014-09-07 00:00:33.329 [NotebookApp] Use Control-C to stop this server and shut

down all kernels (twice to skip confirmation).

2014-09-07 00:00:33.875 [NotebookApp] ERROR | Unhandled error in API request

Traceback (most recent call last):

  File "C:\anaconda\lib\site-packages\IPython\html\base\handlers.py", line 332,

in wrapper

    result = method(self, *args, **kwargs)

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\handlers.p

y", line 78, in get

    for nb in nbm.list_notebooks(path):

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana

ger.py", line 235, in list_notebooks

    for name in notebook_names if self.should_list(name)]

  File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana

ger.py", line 262, in get_notebook

    created = tz.utcfromtimestamp(info.st_ctime)

  File "C:\anaconda\lib\site-packages\IPython\utils\tz.py", line 41, in utc_meth

od

 

    dt = unaware(*args, **kwargs)

ValueError: timestamp out of range for platform localtime()/gmtime() function

ERROR:tornado.access:{

  "Accept-Language": "en-US,en;q=0.8",

  "Accept-Encoding": "gzip,deflate,sdch",

  "Connection": "keep-alive",

  "Accept": "application/json, text/javascript, */*; q=0.01",

  "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML,

like Gecko) Chrome/36.0.1985.143 Safari/537.36",

  "Dnt": "1",

  "Host": "localhost:8888",

  "X-Requested-With": "XMLHttpRequest",

  "Referer": "http://localhost:8888/tree"

}

 

ERROR:tornado.access:500 GET /api/notebooks?_=1410073425115 (::1) 19.00ms refere

r=http://localhost:8888/tree

 

Any idea what’s going wrong? By the way, I’m currently using anaconda 2.0.1 with IPython 2.2.0 (the latest versions installed by anaconda), but I’ve seen this problem for a while, so I don’t think it’s just this version of IPython that’s the problem.

 

Again, “ipython notebook” runs fine in every other directory I’ve tried on the same machine.

 

Thanks for any suggestions.

 

Richard Stanton


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Error connecting to server" with IPython notebook in one particular directory

Richard Stanton
Thanks!

Yes. There are lots of files in that directory with negative values for st_ctime(). No idea why - it doesn’t seem like a very good thing! Any suggestions for how to correct this?

On Sep 7, 2014, at 10:09 AM, Thomas Kluyver <[hidden email]> wrote:

> It looks like there's a file in there with a strange ctime (creation time).  Can you investigate what that is? Try calling os.stat(filename).st_ctime on each file in that directory.
>
> By the way, we're gradually deprecating ipython-user and merging discussion into ipython-dev, so you might prefer to ask questions there in the future. We also have a chat room, and we monitor the ipython tag on Stackoverflow for questions.
>
> Best wishes,
> Thomas
>
> On 7 September 2014 00:08, Richard Stanton <[hidden email]> wrote:
> I’ve been using IPython notebook with the Anaconda distribution on both OS X and Windows for quite some while. Mostly, everything runs without a hitch on both systems. If I type “ipython notebook”, my browser pops up with a list of ipynb files in the current directory, and off I go.
>
>  
> However, there’s one of my project directories where this doesn’t work. It’s fine on my Mac, but on the Windows machine, in this one directory (it works fine in other directories), the browser window shows no files (even though there are a number of notebook files there). Instead, it shows just the root (“/”), and on the line after this is the text “Error connecting to server”. In the command shell running the server, this is what I see:
>
>  
> 2014-09-07 00:00:33.328 [NotebookApp] Serving notebooks from local directory: C:
>
> \projects\ESOest
>
> 2014-09-07 00:00:33.328 [NotebookApp] 0 active kernels
>
> 2014-09-07 00:00:33.328 [NotebookApp] The IPython Notebook is running at: http:/
>
> /localhost:8888/
>
> 2014-09-07 00:00:33.329 [NotebookApp] Use Control-C to stop this server and shut
>
> down all kernels (twice to skip confirmation).
>
> 2014-09-07 00:00:33.875 [NotebookApp] ERROR | Unhandled error in API request
>
> Traceback (most recent call last):
>
>   File "C:\anaconda\lib\site-packages\IPython\html\base\handlers.py", line 332,
>
> in wrapper
>
>     result = method(self, *args, **kwargs)
>
>   File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\handlers.p
>
> y", line 78, in get
>
>     for nb in nbm.list_notebooks(path):
>
>   File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana
>
> ger.py", line 235, in list_notebooks
>
>     for name in notebook_names if self.should_list(name)]
>
>   File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana
>
> ger.py", line 262, in get_notebook
>
>     created = tz.utcfromtimestamp(info.st_ctime)
>
>   File "C:\anaconda\lib\site-packages\IPython\utils\tz.py", line 41, in utc_meth
>
> od
>
>  
>     dt = unaware(*args, **kwargs)
>
> ValueError: timestamp out of range for platform localtime()/gmtime() function
>
> ERROR:tornado.access:{
>
>   "Accept-Language": "en-US,en;q=0.8",
>
>   "Accept-Encoding": "gzip,deflate,sdch",
>
>   "Connection": "keep-alive",
>
>   "Accept": "application/json, text/javascript, */*; q=0.01",
>
>   "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML,
>
> like Gecko) Chrome/36.0.1985.143 Safari/537.36",
>
>   "Dnt": "1",
>
>   "Host": "localhost:8888",
>
>   "X-Requested-With": "XMLHttpRequest",
>
>   "Referer": "http://localhost:8888/tree"
>
> }
>
>  
> ERROR:tornado.access:500 GET /api/notebooks?_=1410073425115 (::1) 19.00ms refere
>
> r=http://localhost:8888/tree
>
>  
> Any idea what’s going wrong? By the way, I’m currently using anaconda 2.0.1 with IPython 2.2.0 (the latest versions installed by anaconda), but I’ve seen this problem for a while, so I don’t think it’s just this version of IPython that’s the problem.
>
>  
> Again, “ipython notebook” runs fine in every other directory I’ve tried on the same machine.
>
>  
> Thanks for any suggestions.
>
>  
> Richard Stanton
>
>
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|

Re: "Error connecting to server" with IPython notebook in one particular directory

Thomas Kluyver-2
It looks like you can get programs that let you fiddle with these values:

http://superuser.com/questions/71962/how-to-change-file-creation-time-in-the-different-file-systems

IPython should probably catch the error and do something sensible, though, if you want to make a pull request.

Thomas

On 8 September 2014 12:09, Richard Stanton <[hidden email]> wrote:
Thanks!

Yes. There are lots of files in that directory with negative values for st_ctime(). No idea why - it doesn’t seem like a very good thing! Any suggestions for how to correct this?

On Sep 7, 2014, at 10:09 AM, Thomas Kluyver <[hidden email]> wrote:

> It looks like there's a file in there with a strange ctime (creation time).  Can you investigate what that is? Try calling os.stat(filename).st_ctime on each file in that directory.
>
> By the way, we're gradually deprecating ipython-user and merging discussion into ipython-dev, so you might prefer to ask questions there in the future. We also have a chat room, and we monitor the ipython tag on Stackoverflow for questions.
>
> Best wishes,
> Thomas
>
> On 7 September 2014 00:08, Richard Stanton <[hidden email]> wrote:
> I’ve been using IPython notebook with the Anaconda distribution on both OS X and Windows for quite some while. Mostly, everything runs without a hitch on both systems. If I type “ipython notebook”, my browser pops up with a list of ipynb files in the current directory, and off I go.
>
>
> However, there’s one of my project directories where this doesn’t work. It’s fine on my Mac, but on the Windows machine, in this one directory (it works fine in other directories), the browser window shows no files (even though there are a number of notebook files there). Instead, it shows just the root (“/”), and on the line after this is the text “Error connecting to server”. In the command shell running the server, this is what I see:
>
>
> 2014-09-07 00:00:33.328 [NotebookApp] Serving notebooks from local directory: C:
>
> \projects\ESOest
>
> 2014-09-07 00:00:33.328 [NotebookApp] 0 active kernels
>
> 2014-09-07 00:00:33.328 [NotebookApp] The IPython Notebook is running at: http:/
>
> /localhost:8888/
>
> 2014-09-07 00:00:33.329 [NotebookApp] Use Control-C to stop this server and shut
>
> down all kernels (twice to skip confirmation).
>
> 2014-09-07 00:00:33.875 [NotebookApp] ERROR | Unhandled error in API request
>
> Traceback (most recent call last):
>
>   File "C:\anaconda\lib\site-packages\IPython\html\base\handlers.py", line 332,
>
> in wrapper
>
>     result = method(self, *args, **kwargs)
>
>   File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\handlers.p
>
> y", line 78, in get
>
>     for nb in nbm.list_notebooks(path):
>
>   File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana
>
> ger.py", line 235, in list_notebooks
>
>     for name in notebook_names if self.should_list(name)]
>
>   File "C:\anaconda\lib\site-packages\IPython\html\services\notebooks\filenbmana
>
> ger.py", line 262, in get_notebook
>
>     created = tz.utcfromtimestamp(info.st_ctime)
>
>   File "C:\anaconda\lib\site-packages\IPython\utils\tz.py", line 41, in utc_meth
>
> od
>
>
>     dt = unaware(*args, **kwargs)
>
> ValueError: timestamp out of range for platform localtime()/gmtime() function
>
> ERROR:tornado.access:{
>
>   "Accept-Language": "en-US,en;q=0.8",
>
>   "Accept-Encoding": "gzip,deflate,sdch",
>
>   "Connection": "keep-alive",
>
>   "Accept": "application/json, text/javascript, */*; q=0.01",
>
>   "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML,
>
> like Gecko) Chrome/36.0.1985.143 Safari/537.36",
>
>   "Dnt": "1",
>
>   "Host": "localhost:8888",
>
>   "X-Requested-With": "XMLHttpRequest",
>
>   "Referer": "http://localhost:8888/tree"
>
> }
>
>
> ERROR:tornado.access:500 GET /api/notebooks?_=1410073425115 (::1) 19.00ms refere
>
> r=http://localhost:8888/tree
>
>
> Any idea what’s going wrong? By the way, I’m currently using anaconda 2.0.1 with IPython 2.2.0 (the latest versions installed by anaconda), but I’ve seen this problem for a while, so I don’t think it’s just this version of IPython that’s the problem.
>
>
> Again, “ipython notebook” runs fine in every other directory I’ve tried on the same machine.
>
>
> Thanks for any suggestions.
>
>
> Richard Stanton
>
>
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user