w4ffl35 / krita_stable_diffusion

A Stable Diffusion plugin for Krita
GNU General Public License v3.0
133 stars 6 forks source link

Plugin Config Button is unable to restart Stable Diffusion on Linux #52

Open metanerd opened 1 year ago

metanerd commented 1 year ago

Describe the bug Plugin Config Button is unable to restart Stable Diffusion. I guess, it is not running to begin with.

To Reproduce Steps to reproduce the behavior:

  1. Install plugin and stable diffusion following the Readme.txt for Linux.
  2. Click on Plugin Config "Restart Stable Diffusion" Button
  3. See error
    
    AttributeError
    Python 3.8.1: /usr/bin/python3
    Sun Oct  2 16:56:35 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/myuser/.local/share/krita/pykrita/krita_stable_diffusion/interface/widgets/button.py in () 19 """ 20 element = QPushButton(self.label) 21 element.released.connect(lambda: self.release_callback(element)) 22 self.widget = self.initialize_widget(element) 23 element = element.released = element.released.connect = self = self.release_callback = >

/home/myuser/.local/share/krita/pykrita/krita_stable_diffusion/interface/tabs/configtab.py in restart_stable_diffusion(self=, _element=) 28 Restarts the Stable Diffusion Response connection 29 """ 30 Application.sdresponse_connection.restart() 31 # os.system("sudo systemctl restart stablediffusiond.service") 32 # os.system("sudo systemctl restart stablediffusion_responsed.service") builtinApplication = Application.sdresponse_connection undefined AttributeError: 'Krita' object has no attribute 'sdresponse_connection' 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 = ("'Krita' object has no attribute 'sdresponse_connection'",) 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/myuser/.local/share/krita/pykrita/krita_stable_diffusion/interface/widgets/button.py", line 21, in element.released.connect(lambda: self.release_callback(element)) File "/home/myuser/.local/share/krita/pykrita/krita_stable_diffusion/interface/tabs/configtab.py", line 30, in restart_stable_diffusion Application.sdresponse_connection.restart() AttributeError: 'Krita' object has no attribute 'sdresponse_connection'



**Expected behavior**
A silent restart.

**Desktop (please complete the following information):**

- OS: Linux Mint (Ubuntu 20.04 derivative)
w4ffl35 commented 1 year ago

Thanks will fix