stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

M1 Pro SyntaxError: invalid syntax

Open 813rico opened this issue 3 years ago • 12 comments

When i try to run, .run_webui_mac.sh and doesnt open the web ui.

Steps to reproduce the behavior:

  1. Go to 'Terminal after installing. Run CD, then folder directory
  2. Then run the script (everything is fine, except for syntax error)

Expected behavior It's supposed to open the Web Ui / Give me local address to use Stable Diffusion

  • **_"To make your changes take effect please reactivate your environment
  • WARNING: overwriting environment variables set in the machine
  • overwriting variable PYTORCH_ENABLE_MPS_FALLBACK
  • =============================================
  • =============================================
  • ==============MORE INFORMATION===============
  • =============================================
  • =============================================
  • If you want to run the web UI again, you can run the following command:
  • ./stable-diffusion-webui/run_webui_mac.sh
  • TEXT FROM SCREENSHOT
  • cd stable-diffusion-webui && ./run_webui_mac.sh
  • =============================================
  • =============================================
  • =============================================
  • =============================================
  • File "webui.py", line 92
  • print(f'Interrupted with signal {sig} in {frame}')
    
  • SyntaxError: invalid syntax
  • (base) 813rico@Juans-MacBook-Pro Documents %_**

Screen Shot 2022-10-10 at 9 20 53 PM

Desktop (please complete the following information):

  • OS: M1 Pro, 32 Gb Ram, MacOS Monterey 12.2.1

Please help me out, I really need this version to work. Here's my discord if anyone is fine to contact me 813rico#4771 .

813rico avatar Oct 11 '22 01:10 813rico

It seems that the python version is relatively low, can you post your python version, if it is lower than python3.6, you cannot use 'f' to format the string

libra146 avatar Oct 11 '22 02:10 libra146

You're running an old version of python, from before fstrings were a thing, your installation guide should instruct you to upgrade it.

dfaker avatar Oct 11 '22 03:10 dfaker

@dfaker @libra146 the version is the latest version 3.10.7 . Why close the issue...

813rico avatar Oct 11 '22 03:10 813rico

Because that's the exact error, and position of the error claret indicator that versions of python without fstrings prior to 3.6 produced, I viewed that as pretty straightforwardly diagnostic.

If that's running in 3.10.1 it should not error, based on all the visible text.

dfaker avatar Oct 11 '22 05:10 dfaker

You may have multiple versions of python installed, please try to output the current python version

libra146 avatar Oct 11 '22 05:10 libra146

Will check right now, appreciate u guys

813rico avatar Oct 11 '22 12:10 813rico

Screen Shot 2022-10-11 at 9 26 54 AM

python versions

813rico avatar Oct 11 '22 13:10 813rico

Okay so i fixed my python version, it was defaulted to 2.7. Now, its defaulted on the 3.9.12 version and i did a clean install and im getting same error Screen Shot 2022-10-11 at 10 53 01 AM Screen Shot 2022-10-11 at 10 53 21 AM

813rico avatar Oct 11 '22 14:10 813rico

someone please help me, here's my discord 813rico#4771

813rico avatar Oct 11 '22 16:10 813rico

I fixed the syntax error but now im getting this, yes im activating conda, Screen Shot 2022-10-11 at 6 02 10 PM

813rico avatar Oct 11 '22 22:10 813rico

If it didn't work, what about change the bash script and replace python to python3?

kokoro-aya avatar Oct 13 '22 21:10 kokoro-aya

I'm also running into this error, Python 3.9.6

tong0x avatar Nov 26 '22 07:11 tong0x