I'm using jupyter notebook in firefox and I keep getting this error whenever I run a program [E 19:06:49.747 NotebookApp] Error while saving file: xG_SetPiece_Model.ipynb [Errno 9] Bad file descriptor
The full error in powershell is:
[E 19:06:49.747 NotebookApp] Error while saving file: xG_SetPiece_Model.ipynb [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\filemanager.py", line 493, in save
self._save_notebook(os_path, nb)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\fileio.py", line 290, in _save_notebook
nbformat.write(nb, f, version=nbformat.NO_CONVERT)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 126, in __exit__
next(self.gen)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\fileio.py", line 210, in atomic_writing
yield f
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 126, in __exit__
next(self.gen)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\fileio.py", line 118, in atomic_writing
os.fsync(fileobj.fileno())
OSError: [Errno 9] Bad file descriptor
[W 19:06:49.747 NotebookApp] 500 PUT /api/contents/xG_SetPiece_Model.ipynb (127.0.0.1): Unexpected error while saving file: xG_SetPiece_Model.ipynb [Errno 9] Bad file descriptor
[W 19:06:49.747 NotebookApp] Unexpected error while saving file: xG_SetPiece_Model.ipynb [Errno 9] Bad file descriptor
[E 19:06:49.747 NotebookApp] {
"Host": "localhost:8888",
"Accept": "application/json, text/javascript, */*; q=0.01",
"Referer": "http://localhost:8888/notebooks/xG_SetPiece_Model.ipynb",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"
}
[E 19:06:49.762 NotebookApp] 500 PUT /api/contents/xG_SetPiece_Model.ipynb (127.0.0.1) 1319.730000ms referer=http://localhost:8888/notebooks/xG_SetPiece_Model.ipynb
[I 19:07:33.833 NotebookApp] Saving file at /xG_SetPiece_Model.ipynb
[I 19:09:48.442 NotebookApp] Saving file at /xG_SetPiece_Model.ipynb
[E 19:09:51.971 NotebookApp] Error while saving file: xG_SetPiece_Model.ipynb [Errno 9] Bad file descriptor
Traceback (most recent call last):
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\filemanager.py", line 493, in save
self._save_notebook(os_path, nb)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\fileio.py", line 290, in _save_notebook
nbformat.write(nb, f, version=nbformat.NO_CONVERT)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 126, in __exit__
next(self.gen)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\fileio.py", line 210, in atomic_writing
yield f
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 126, in __exit__
next(self.gen)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\site-packages\notebook\services\contents\fileio.py", line 118, in atomic_writing
os.fsync(fileobj.fileno())
OSError: [Errno 9] Bad file descriptor
System
- Windows 10
- Python 3.9.12 (64 bit)
- Pip 22.3
- Jupyter 1.0.0
The snapshot of jupyter notebook interface
I've tried some solutions but they haven't wokrked.