w4ffl35 / krita_stable_diffusion

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

The plugin is giving me this error #115

Open CHJ85 opened 1 year ago

CHJ85 commented 1 year ago

I cannot make sense of this error that I'm getting upon starting Krita after installing this script:

ValueError
Python 3.11.6: /usr/bin/python3
Sat Dec  2 20:30:56 2023

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/chris/.local/share/krita/pykrita/krita_stable_diffusion/interface/widgets/line_edit.py in <lambda>()
   25         if self.config_name:
   26             element.textChanged.connect(
   27                 lambda: self.update_value(self.config_name, element.text())
   28             )
   29             element.setText(str(self.config.value(self.config_name)))
self = <krita_stable_diffusion.interface.widgets.line_edit.LineEdit object>
self.update_value = <bound method LineEdit.update_value of <krita_st...ion.interface.widgets.line_edit.LineEdit object>>
self.config_name = 'outpaint_seed'
element = <PyQt5.QtWidgets.QLineEdit object>
element.text = <built-in method text of QLineEdit object>

 /home/chris/.local/share/krita/pykrita/krita_stable_diffusion/interface/widgets/line_edit.py in update_value(self=<krita_stable_diffusion.interface.widgets.line_edit.LineEdit object>, config_name='outpaint_seed', value='None')
   15 
   16     def update_value(self, config_name, value):
   17         if self.max and value and value != "" and int(value) > self.max:
   18             value = self.max
   19             self.widget.setText(str(value))
self = <krita_stable_diffusion.interface.widgets.line_edit.LineEdit object>
self.max = 4294967295
value = 'None'
builtinint = <class 'int'>
ValueError: invalid literal for int() with base 10: 'None'
    __cause__ = None
    __class__ = <class 'ValueError'>
    __context__ = None
    __delattr__ = <method-wrapper '__delattr__' of ValueError object>
    __dict__ = {}
    __dir__ = <built-in method __dir__ of ValueError object>
    __doc__ = 'Inappropriate argument value (of correct type).'
    __eq__ = <method-wrapper '__eq__' of ValueError object>
    __format__ = <built-in method __format__ of ValueError object>
    __ge__ = <method-wrapper '__ge__' of ValueError object>
    __getattribute__ = <method-wrapper '__getattribute__' of ValueError object>
    __getstate__ = <built-in method __getstate__ of ValueError object>
    __gt__ = <method-wrapper '__gt__' of ValueError object>
    __hash__ = <method-wrapper '__hash__' of ValueError object>
    __init__ = <method-wrapper '__init__' of ValueError object>
    __init_subclass__ = <built-in method __init_subclass__ of type object>
    __le__ = <method-wrapper '__le__' of ValueError object>
    __lt__ = <method-wrapper '__lt__' of ValueError object>
    __ne__ = <method-wrapper '__ne__' of ValueError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of ValueError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of ValueError object>
    __repr__ = <method-wrapper '__repr__' of ValueError object>
    __setattr__ = <method-wrapper '__setattr__' of ValueError object>
    __setstate__ = <built-in method __setstate__ of ValueError object>
    __sizeof__ = <built-in method __sizeof__ of ValueError object>
    __str__ = <method-wrapper '__str__' of ValueError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __suppress_context__ = False
    __traceback__ = <traceback object>
    add_note = <built-in method add_note of ValueError object>
    args = ("invalid literal for int() with base 10: 'None'",)
    with_traceback = <built-in method with_traceback of ValueError object>

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

Traceback (most recent call last):
  File "/home/chris/.local/share/krita/pykrita/krita_stable_diffusion/interface/widgets/line_edit.py", line 27, in <lambda>
    lambda: self.update_value(self.config_name, element.text())
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/.local/share/krita/pykrita/krita_stable_diffusion/interface/widgets/line_edit.py", line 17, in update_value
    if self.max and value and value != "" and int(value) > self.max:
                                              ^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'None'