notebook: Error while launching a Jupyter notebook

I encountered with a strange error(I wasn’t able to see the file TREE!!!) while executing a jupyter notebook. And the below ones are the error logs.

Server error: Traceback (most recent call last):
File "C:\Users\350U2A\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 516, in wrapper
 result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\350U2A\Anaconda3\lib\site-packages\tornado\gen.py", line 1055, in run
 value = future.result()
File "C:\Users\350U2A\Anaconda3\lib\site-packages\tornado\concurrent.py", line 238, in result
 raise_exc_info(self._exc_info)
File "<string>", line 4, in raise_exc_info
File "C:\Users\350U2A\Anaconda3\lib\site-packages\tornado\gen.py", line 307, in wrapper
 yielded = next(result)
File "C:\Users\350U2A\Anaconda3\lib\site-packages\notebook\services\contents\handlers.py", line 124, in get
 path=path, type=type, format=format, content=content,
File "C:\Users\350U2A\Anaconda3\lib\site-packages\notebook\services\contents\filemanager.py", line 382, in get
 model = self._dir_model(path, content=content)
File "C:\Users\350U2A\Anaconda3\lib\site-packages\notebook\services\contents\filemanager.py", line 264, in _dir_model
 model = self._base_model(path)
File "C:\Users\350U2A\Anaconda3\lib\site-packages\notebook\services\contents\filemanager.py", line 230, in _base_model
 created = tz.utcfromtimestamp(info.st_ctime)
File "C:\Users\350U2A\Anaconda3\lib\site-packages\notebook\_tz.py", line 30, in utc_method
 dt = unaware(*args, **kwargs)
OSError: [Errno 22] Invalid argument

error

So I’ve tried to solve the error with various methods, but, I wasn’t able to solve one till now. And there are some lists what I’ve tried but failed to solve the problem

  1. I appointed the starting location of jupyter via ‘jupyter_notebook_config.py’ file like this. -> c.NotebookApp.notebook_dir = r"C:/Users/350U2A/Desktop" However, It generated the same error just like before.

  2. Deleted all the files and packages related with jupyter notebook and reinstalled the program. But it also activated the same problem

  3. Modified the starting location of jupyter in ‘jupyter_notebook_config.py’ as -> c.NotebookApp.notebook_dir = r"C:/Users/" At first it seems this measure works(cause the file tree was appeared on the page), however, when I clicked the folder named ‘350U2A’, the same problem had occurred again. As soon as I click the folder, the TREE again, wasn’t displayed but some above error logs(what I wrote above).

  4. Finally I just created a folder under ‘350U2A’ directory, and named the folder as NOTEBOOK, and changed the starting directory from “C:/Users/350U2A/Desktop” to “C:/Users/350U2A/NOTEBOOK”. Strangely, this time, notebook was launched with no such problem. And the file TREE was appeared appropriately on Web browser. However, when I execute jupyter notebook in higher folder, it still shows the same problem. And it means the fundamental matter is not resolved.

Is there anyone who can help me with this problem?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (5 by maintainers)

Commits related to this issue

Most upvoted comments

The pull request is against master, which is already a bit different from the released version. If you first install the 5.1 release candidate, you should have a more similar starting point to make the change on:

pip install --pre --upgrade notebook

No problem on response time. I appreciate your time and help. I believe you have point me in the right direction. The link you provided correlates with what I have been finding. Again, thank you and all the best.

Dave

#2770 should catch that error and use a fallback.