-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Milestone
Description
While working in ipython notebook, I make reboot of my OS X by shotdown button. After restart, I saw error upon attempt to open .ipynb files by ipython notebook. This is the first error that I've get:
[E 10:42:13.434 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/notebook/base/handlers.py", line 436, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/tornado/concurrent.py", line 215, in result
raise_exc_info(self._exc_info)
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/tornado/gen.py", line 230, in wrapper
yielded = next(result)
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/notebook/services/contents/handlers.py", line 126, in get
path=path, type=type, format=format, content=content,
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/notebook/services/contents/filemanager.py", line 350, in get
model = self._notebook_model(path, content=content)
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/notebook/services/contents/filemanager.py", line 310, in _notebook_model
self.mark_trusted_cells(nb, path)
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/notebook/services/contents/manager.py", line 447, in mark_trusted_cells
trusted = self.notary.check_signature(nb)
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/nbformat/sign.py", line 220, in check_signature
if self.db is None:
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/traitlets/traitlets.py", line 439, in __get__
value = self._validate(obj, dynamic_default())
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/nbformat/sign.py", line 127, in _db_default
self.init_db(db)
File "/Users/cnst/anaconda/envs/py27/lib/python2.7/site-packages/nbformat/sign.py", line 139, in init_db
)""")
DatabaseError: database disk image is malformed
[E 10:42:13.438 NotebookApp] {
"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 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36",
"Host": "localhost:8888",
"Referer": "http://localhost:8888/notebooks/assignment1/softmax.ipynb",
"X-Requested-With": "XMLHttpRequest"
}
I was looking for a solution and found suggestions of moving/deleting files in previous issues:
~/.ipython/profile_default/security/nbsignatures.db
and
~/.ipython/profile_default/history.sqlite
It didn't fix the problem.
After all, because ipython notebook comes with Anaconda distribution, I've tried to reinstall anaconda (erase ~/anaconda folder, and at second attempt erase it with ~/.ipython and ~/.jupyter directories).
Now I've got something like this:
[E 19:19:57.919 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/Users/cnst/anaconda/lib/python3.5/site-packages/traitlets/traitlets.py", line 432, in __get__
value = obj._trait_values[self.name]
KeyError: 'db'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cnst/anaconda/lib/python3.5/site-packages/notebook/base/handlers.py", line 436, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/cnst/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/Users/cnst/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 215, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/Users/cnst/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 230, in wrapper
yielded = next(result)
File "/Users/cnst/anaconda/lib/python3.5/site-packages/notebook/services/contents/handlers.py", line 126, in get
path=path, type=type, format=format, content=content,
File "/Users/cnst/anaconda/lib/python3.5/site-packages/notebook/services/contents/filemanager.py", line 350, in get
model = self._notebook_model(path, content=content)
File "/Users/cnst/anaconda/lib/python3.5/site-packages/notebook/services/contents/filemanager.py", line 310, in _notebook_model
self.mark_trusted_cells(nb, path)
File "/Users/cnst/anaconda/lib/python3.5/site-packages/notebook/services/contents/manager.py", line 447, in mark_trusted_cells
trusted = self.notary.check_signature(nb)
File "/Users/cnst/anaconda/lib/python3.5/site-packages/nbformat/sign.py", line 220, in check_signature
if self.db is None:
File "/Users/cnst/anaconda/lib/python3.5/site-packages/traitlets/traitlets.py", line 439, in __get__
value = self._validate(obj, dynamic_default())
File "/Users/cnst/anaconda/lib/python3.5/site-packages/nbformat/sign.py", line 127, in _db_default
self.init_db(db)
File "/Users/cnst/anaconda/lib/python3.5/site-packages/nbformat/sign.py", line 139, in init_db
)""")
sqlite3.DatabaseError: database disk image is malformed
[E 19:19:57.928 NotebookApp] {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, sdch",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36",
"Host": "localhost:8888",
"Accept": "application/json, text/javascript, */*; q=0.01",
"X-Requested-With": "XMLHttpRequest",
"Referer": "http://localhost:8888/notebooks/notebooks/neuralnetworks/assignment1/softmax.ipynb",
"Accept-Language": "en-US,en;q=0.8"
}
And after complete reinstalling anaconda with folders deletion folder
~/.ipython/profile_default/security
is empty.
I didn't understand what I should do in this situation. Maybe you can help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels