internationalTD / defuser

the Stable Diffusion Plugin for Photoshop and Krita
https://internationaltd.github.io/defuser/
73 stars 2 forks source link

Plugin don't work after install, empty docker, showing this error... #6

Closed valden80 closed 1 year ago

valden80 commented 1 year ago

Manjaro Linux, Krita 5.1.1

After install docker is empty. If try to "SD check requirements and fix" option, it show this error:

AttributeError Python 3.10.7: /usr/bin/python3 Sun Oct 30 11:45:33 2022

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

/home/usersd/.local/share/krita/pykrita/Defuser/init.py in f() 31 32 docker = self.getDocker() 33 mode = docker.widget().findChildren(QTabWidget)[0].tabText( docker.widget().findChildren(QTabWidget)[0].currentIndex()) 34 loop_max = 32 35 while not docker.checkReady(mode) and loop_max >0: mode undefined docker = docker.widget = ).findChildren undefined global QTabWidget = <class 'PyQt5.QtWidgets.QTabWidget'> ].tabText = ].currentIndex = AttributeError: 'NoneType' object has no attribute 'findChildren' cause = None class = <class 'AttributeError'> context = None delattr = <method-wrapper 'delattr' of AttributeError object> dict = {} dir = doc = 'Attribute not found.' eq = <method-wrapper 'eq' of AttributeError object> format = ge = <method-wrapper 'ge' of AttributeError object> getattribute = <method-wrapper 'getattribute' of AttributeError object> gt = <method-wrapper 'gt' of AttributeError object> hash = <method-wrapper 'hash' of AttributeError object> init = <method-wrapper 'init' of AttributeError object> init_subclass = <built-in method init_subclass of type object> le = <method-wrapper 'le' of AttributeError object> lt = <method-wrapper 'lt' of AttributeError object> ne = <method-wrapper 'ne' of AttributeError object> new = reduce = reduce_ex = <built-in method reduce_ex of AttributeError object> repr = <method-wrapper 'repr' of AttributeError object> setattr = <method-wrapper 'setattr' of AttributeError object> setstate = sizeof = str = <method-wrapper 'str' of AttributeError object> subclasshook = __suppress_context = False traceback__ = args = ("'NoneType' object has no attribute 'findChildren'",) name = 'findChildren' obj = None with_traceback =

The above is a description of an error in a Python program. Here is the original traceback:

Traceback (most recent call last): File "/home/usersd/.local/share/krita/pykrita/Defuser/init.py", line 33, in f mode = docker.widget().findChildren(QTabWidget)[0].tabText( docker.widget().findChildren(QTabWidget)[0].currentIndex()) AttributeError: 'NoneType' object has no attribute 'findChildren'

internationalTD commented 1 year ago

The docker stays empty when Defuser can't connect to the WebUI. Is it possible that either the UI is not running on the default localhost:7860, or it didn't fully launch (i.e. was accessible in a browser as well) before you opened Krita? You should see this in your WebUI terminal:

Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.

I will improve this behavior in a future release.

valden80 commented 1 year ago

Yes, it's fully launched, I opened link http://127.0.0.1:7860 in browser and generate test image. Then I start Krita and have empty docker and error.

Also I just updated SD to last version by git pull, and added --api option to the webui-user.sh - nothing changes.

internationalTD commented 1 year ago

Thank you very much for your time and help with fixing this issue. You shouldn't need the --api argument at all, actually.

I had a bad url string in a GET request somewhere, which meant defuser would only work on a machine with an edited hosts file.

I pushed a new build that hopefully fixes it. Please update and see if defuser starts normally. If it does not, let me know and i will reopen this.