question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when trying to run notebook all of a sudden

See original GitHub issue
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-12-55b102f3c5f0>](https://localhost:8080/#) in <module>
     44 if Use_Gradio_Server:
     45   share='--share'
---> 46   for line in fileinput.input('/usr/local/lib/python3.7/dist-packages/gradio/blocks.py', inplace=True):
     47     if line.strip().startswith('self.server_name ='):
     48         line = '            self.server_name = server_name\n'

1 frames
[/usr/lib/python3.8/fileinput.py](https://localhost:8080/#) in _readline(self)
    340                     pass
    341                 # The next few lines may raise OSError
--> 342                 os.rename(self._filename, self._backupfilename)
    343                 self._file = open(self._backupfilename, self._mode)
    344                 try:

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.7/dist-packages/gradio/blocks.py' -> '/usr/local/lib/python3.7/dist-packages/gradio/blocks.py.bak'

Happens every single time now. Was working an hour ago…

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:35 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
TheLastBencommented, Nov 30, 2022

colab switched to python 3.8, I’m waiting for a confirmation from multiple users to adjust the colabs

3reactions
plambecommented, Nov 30, 2022

So I think I got it running by

  • using colab’s search and replace (menu edit), I replaced all occurrences of python3.7 with python3.8
  • then in the first code block I added the following to deal with the missing dependencies:
!pip install GitPython jsonmerge einops clean-fid clip resize_right torchdiffeq lark omegaconf lpips basicsr pytorch_lightning piexif fonts font-roboto triton==2.0.0.dev20221120 transformers facexlib gfpgan realesrgan

It needs a high system RAM runtime in colab but now it runs fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do when things go wrong - The Jupyter Notebook
If Jupyter gives an error that it can't find notebook , check with pip or conda that the notebook package ... Try running...
Read more >
Fatal Error when starting jupyter notebook - Stack Overflow
I tried doing so, it works OK but I need to run this command every time I try to launch Jupyter. Also, I...
Read more >
How to Fix Kernel Error in Jupyter Notebook
When the system encounters difficulties locating the path which certain programs will run, this error is known as a kernel error in Jupyter...
Read more >
My notebook(.ipynb) won't open! · Issue #10941 - GitHub
I was working on my notebook getting through some tests, using a bunch of while cycles, and all of a sudden the whole...
Read more >
Error Messages Display on a Blue Screen (Windows 10)
1. In Windows, search for and open View advanced system settings. 2. In the Startup and Recovery section, click Settings. 3. Remove the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found