Closed Hew-ux closed 7 months ago
this basically means that any request that browser makes cannot be found on the server at all.
it probably doesn't matter, but can you test with clean install on path without spaces?
your current install folder is /home/niroku/Applications/SD Next/automatic
also, no need for anaconda since sdnext will create and use venv. and venv inside conda makes no sense
When attempting to follow the install instructions directly, it says that it is an incompatible Pyhthon version, hence why I was using anaconda in the first place. Could this be the cause of the issue?
Here is the output from the folder /home/niroku/Applications/SDNext
:
[user@computer SDNext]$ git clone https://github.com/vladmandic/automatic
Cloning into 'automatic'...
remote: Enumerating objects: 43103, done.
remote: Counting objects: 100% (207/207), done.
remote: Compressing objects: 100% (106/106), done.
remote: Total 43103 (delta 112), reused 189 (delta 100), pack-reused 42896
Receiving objects: 100% (43103/43103), 53.45 MiB | 2.76 MiB/s, done.
Resolving deltas: 100% (31092/31092), done.
[user@computer SDNext]$ cd automatic/
[user@computer automatic]$ ./webui.sh
Create and activate python venv
Launching launch.py...
17:49:14-526368 INFO Starting SD.Next
17:49:14-528822 INFO Logger: file="/home/niroku/Applications/SDNext/automatic/sdnext.log"
level=INFO size=64 mode=append
17:49:14-529737 INFO Python 3.12.2 on Linux
17:49:14-530373 ERROR Incompatible Python version: 3.12.2 required 3.[9, 10, 11]
[user@computer automatic]$
that part is clear - and possible usage of python 3.12 is documented in wiki - but that is not what caused the original issue.
and you don't need conda to specify different python, simply set env variable PYTHON=path_to_python
before starting sdnext and it will use whichever python you choose.
for example:
export PYTHON=/bin/python3.11 ./webui.sh --debug
I erased the folder entirely and re-cloned the repo. I also erased the conda environment. Then, following those instructions verbatim:
[user@computer SDNext]$ export PYTHON=/bin/python3.11
[user@computer SDNext]$ export -p | grep "PYTHON"
declare -x PYTHON="/bin/python3.11"
[user@computer SDNext]$ cd automatic/
[user@computer automatic]$ ./webui.sh --debug
Create and activate python venv
Launching launch.py...
Traceback (most recent call last):
File "/home/niroku/Applications/SDNext/automatic/installer.py", line 12, in <module>
import pkg_resources # python 3.12 no longer has it built-in
^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/niroku/Applications/SDNext/automatic/launch.py", line 9, in <module>
import installer
File "/home/niroku/Applications/SDNext/automatic/installer.py", line 15, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
[user@computer automatic]$
Using Python 3.10 also has the same result. I erased the venv folder before doing this.
that's strange. i'll check, but this is in webui.sh
if [[ -z "${PYTHON}" ]]
then
PYTHON="python3"
fi
...
exec "${PYTHON}" launch.py "$@"
so it should use whatever python is specified in PYTHON
env variable.
I did some investigating. In the /lib/python3.10/site-packages
directory there are no folders at all. It could just be that Fedora's meta package for Python 3.10 just doesn't include these things; I'm not knowledgeable enough about Fedora to know why it isn't included in that package and which one would be needed to resolve this, if there is any at all. Anaconda is currently my only method to install this on my OS.
Anyway, I still had a backup of my first attempt so I tried cloning the repo again and then directly copying the venv
folder from the already installed one to the new one, bypassing the need to use the script install the virtual Python environment. This way we can solely focus on the issue at hand, why it isn't installing the required web components.
Here is the output of ./webui.sh --debug
after doing that (there was a lot of message spam so the top was cut off by the scrollback limit; I try again with better results):
output.txt
It works! But it seems like there are some hard-coded paths in the venv that was copied over.
To be sure, I repeated the test, this time copying into a folder name "SD Test", with a space in it. This was also a success, so it's not likely that it's because the folder had a space in it. I managed to capture the top of the output in this one, it has a lot of warnings about missing files but the UI itself is loading okay: top-of-output.txt
this latest test is going in a direction that cannot be troubleshooted - too many manual interventions. also, i'm not sure if having conda env is related or not, but again - too many variables. so to progress here, we need to have:
PYTHON
env variable set to point to that pythonvenv
so it can be created upon startupThis is turning more into a "Is python installed correctly?" issue than anything to do with SD Next. I cannot find a solution to getting Python 3.10 installed in a functioning state natively in Fedora. I ran sudo dnf install python3.10
, installing all the "weak dependencies". I pulled the latest dev branch of SD Next into a new folder, exported the python version, and then ran webui.sh
. It says Error: python3-venv is not installed
. Which is different from last time, where it complained about missing static packages, (in my earlier test, I used dnfdragora to install the python3.10 packages, which should be identical to using dnf
from the command line).
I have searched online for methods to install specifically python3.10 in Fedora, and all sources says to run the command as I did above. A lot of this nonsense is the reason I was using Anaconda in the first place, so I could just say "setup an environment with Python3.10", and it works. But if Anaconda is the thing causing the issue, then the point is moot.
I had thought the issue might be during SD Next's own installation (after python and everything else was sorted) considering it was only web components failing to download and the program itself runs from the virtual python environment installed in venv
folder. But it could very well be this is just an issue with anaconda/Fedora's packaging of older Python versions.
It should be noted in the installation instructions for Linux that "a valid python 3.10 or 3.11 installation" is required here: https://github.com/vladmandic/automatic/wiki/Installation#install-python-and-git
I can consistently reproduce the issue using my anaconda setup, but if it can't be reproduced in an ordinary environment then it's fair game to say this is not an issue with SD Next itself worth investigating. I appreciate you spending time looking into this, but I don't want to waste your time on what is probably an OS issue. Hopefully this information is helpful to other users in some way, even if it's just to confirm that Fedora may have some issues with older Python versions.
thanks for the follow-up writeup!
Issue Description
When starting the webui using
webui.sh
, the page is forever stuck on "Loading" as pictured: In the console there are a series of errors saying "404: File not found".I followed the installation instructions while in an anaconda environment for Python 3.10, however testing it again without the Anaconda environment yields the same result so I don't suspect that it was the cause. I have the full output of both my installation and my attempts to launch and use the webui (inside and outside the anaconda environment) here: File missing error debug output.txt
Version Platform Description
OS: Fedora Browser: Floorp (Firefox fork)
Relevant log output
Backend
Original
Branch
Master
Model
SD 1.5
Acknowledgements