Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'diskcache' #2803

Open
dymension opened this issue Apr 13, 2024 · 11 comments
Open

ModuleNotFoundError: No module named 'diskcache' #2803

dymension opened this issue Apr 13, 2024 · 11 comments

Comments

@dymension
Copy link

dymension commented Apr 13, 2024

Everything was working fine yesterday night (24-04-12) on Google Collab
but this morning I have a sudden error message ending by "ModuleNotFoundError: No module named 'diskcache'"

Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in <module>
    initialize.imports()
  [...]
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/extensions.py", line 9, in <module>
    from modules import shared, errors, cache, scripts
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/cache.py", line 6, in <module>
    import diskcache
ModuleNotFoundError: No module named 'diskcache'

Still, cache.py is there
I have no idea what happened during the night

Reseting all folders and redownloading Automatci 1111 from TheLastBen doesn't solve the issue

@dymension
Copy link
Author

dymension commented Apr 13, 2024

OK, I solved this by just adding a line code into the collab sheet and writing:
pip install diskcache

Then run this line

image

Everything is solved

@70pice
Copy link

70pice commented Apr 13, 2024

Can't use mov2mov

@EvilClivE
Copy link

EvilClivE commented Apr 13, 2024

Thank you @dymension for sharing this quick fix! 👌😎👍- I too was also puzzled this morning when it had seemingly broken overnight!

Sticking this in a new code cell above the 'Start Stable-Diffusion' cell works a treat:

diskcache

@taron37
Copy link

taron37 commented Apr 13, 2024

I got a error when I code 'pip install diskcache', just before "Start Stable-Diffusion"
What is wrong?

File "", line 2
pip install diskcache
^
SyntaxError: invalid syntax

@EvilClivE
Copy link

I got a error when I code 'pip install diskcache', just before "Start Stable-Diffusion" What is wrong?

File "", line 2 pip install diskcache ^ SyntaxError: invalid syntax

Yeah, I also got this syntax error at first too, but I'm not sure what causes it. Try disconnecting and deleting active runtime, then remove any spaces/empty code lines before and after the pip install diskcache code text. The syntax error highlight magically disappeared for me.

For testing, I just created a blank/new notebook and the syntax works fine when the cell is run. 🤔

@dymension
Copy link
Author

Are you sure you add the command line as a new code block ?
You cann add code block by hovering an hidden line above each step (it's quite tricky)
image

You can also try to add the line upper in the script.
I set it right after Automatic Install
image

@taron37
Copy link

taron37 commented Apr 13, 2024

Yeah, I also got this syntax error at first too, but I'm not sure what causes it. Try disconnecting and deleting active runtime, then remove any spaces/empty code lines before and after the pip install diskcache code text. The syntax error highlight magically disappeared for me.

For testing, I just created a blank/new notebook and the syntax works fine when the cell is run. 🤔

I solved the problem to put "!"

!pip install diskcache

@mcqx4
Copy link

mcqx4 commented Apr 13, 2024

I got a error when I code 'pip install diskcache', just before "Start Stable-Diffusion" What is wrong?

File "", line 2 pip install diskcache ^ SyntaxError: invalid syntax

Use " !pip " instead of "pip"

@A3734
Copy link

A3734 commented Apr 14, 2024

"Running !pip install diskcache upgrades the module to version 1.9, it seems. However, several errors are occurring, and 'move2move' is throwing an error in 'm2m_ui.py', causing it to disappear from the module. "

@nigd1vr
Copy link

nigd1vr commented Apr 26, 2024

i did this and it said i had it installed but when i start stable diffusion it still says it cant find it do i have to put it in a specific folder

@dymension
Copy link
Author

Post your OK message and error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants