Interpause/auto-sd-paint-ext

Script-Error Spam

Opened this issue · 1 comments

rtaskf commented

After following the installation guide, I keep getting python-script-errors non-stop when running Krita, looking like this:

TypeError
Python 3.8.1: D:\Programme\Krita\bin\krita.exe
Sat Sep 9 17:33:20 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.

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\docker.py in ()
27 def connect_interface(self):
28 self.page_widget.cfg_connect()
29 script.config_updated.connect(lambda: self.update_interface())
30
31 def canvasChanged(self, canvas):
global script = <krita_diff.script.Script object>
script.config_updated =
script.config_updated.connect =
self = <krita_diff.docker.create_docker..Docker object>
self.update_interface = <bound method create_docker..Docker.upda...iff.docker.create_docker..Docker object>>

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\docker.py in update_interface(self=<krita_diff.docker.create_docker..Docker object>)
23
24 def update_interface(self):
25 self.page_widget.cfg_init()
26
27 def connect_interface(self):
self = <krita_diff.docker.create_docker..Docker object>
self.page_widget = <krita_diff.pages.img2img.Img2ImgPage object>
self.page_widget.cfg_init = <bound method Img2ImgPage.cfg_init of <krita_diff.pages.img2img.Img2ImgPage object>>

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\img2img.py in cfg_init(self=<krita_diff.pages.img2img.Img2ImgPage object>)
23
24 def cfg_init(self):
25 super(Img2ImgPage, self).cfg_init()
26
27 self.tips.setVisible(not script.cfg("minimize_ui", bool))
builtinsuper = <class 'super'>
global Img2ImgPage = <class 'krita_diff.pages.img2img.Img2ImgPage'>
self = <krita_diff.pages.img2img.Img2ImgPage object>
).cfg_init = <bound method Img2ImgPage.cfg_init of <krita_diff.pages.img2img.Img2ImgPage object>>

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\img_base.py in cfg_init(self=<krita_diff.pages.img2img.Img2ImgPage object>)
71
72 def cfg_init(self):
73 self.ext_layout.cfg_init()
74 self.prompt_layout.cfg_init()
75 self.seed_layout.cfg_init()
self = <krita_diff.pages.img2img.Img2ImgPage object>
self.ext_layout = <krita_diff.pages.extension.ExtSectionLayout object>
self.ext_layout.cfg_init = <bound method ExtSectionLayout.cfg_init of <krita_diff.pages.extension.ExtSectionLayout object>>

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\extension.py in cfg_init(self=<krita_diff.pages.extension.ExtSectionLayout object>)
116 self.dropdown.cfg_init()
117 if set(self.ext_names()) != set(self.ext_widgets.keys()):
118 self._init_ext_widgets()
119 for widget in self.ext_widgets.values():
120 widget.cfg_init()
self = <krita_diff.pages.extension.ExtSectionLayout object>
self._init_ext_widgets = >

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\extension.py in _init_ext_widgets(self=<krita_diff.pages.extension.ExtSectionLayout object>)
107 self._clear_ext_widgets()
108 for ext_name in self.ext_names():
109 widget = ExtWidget(script.ext_cfg, self.ext_type, ext_name)
110 widget.setVisible(False)
111 self.addWidget(widget)
widget = <krita_diff.pages.extension.ExtWidget object>
global ExtWidget = <class 'krita_diff.pages.extension.ExtWidget'>
global script = <krita_diff.script.Script object>
script.ext_cfg = <krita_diff.config.Config object>
self = <krita_diff.pages.extension.ExtSectionLayout object>
self.ext_type = 'scripts_img2img'
ext_name = 'Outpainting mk2'

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\extension.py in init(self=<krita_diff.pages.extension.ExtWidget object>, ext_cfg=<krita_diff.config.Config object>, ext_type='scripts_img2img', ext_name='Outpainting mk2', *args=(), **kwargs={})
57 w = QCheckBox(ext_cfg, k, o["label"])
58 elif o["type"] == "multiselect":
59 w = QMultiCheckBoxLayout(ext_cfg, o["opts"], k, o["label"])
60 else:
61 continue
w = None
global QMultiCheckBoxLayout = <class 'krita_diff.widgets.checkbox.QMultiCheckBoxLayout'>
ext_cfg = <krita_diff.config.Config object>
o = {'is_index': False, 'label': 'Outpainting direction', 'opts': [['left', 'left'], ['right', 'right'], ['up', 'up'], ['down', 'down']], 'type': 'multiselect', 'val': ['left', 'right', 'up', 'down']}
k = 'scripts_img2img_outpaintingmk2_3'

C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\widgets\checkbox.py in init(self=<krita_diff.widgets.checkbox.QMultiCheckBoxLayout object>, cfg=<krita_diff.config.Config object>, options_cfg=[['left', 'left'], ['right', 'right'], ['up', 'up'], ['down', 'down']], selected_cfg='scripts_img2img_outpaintingmk2_3', label='Outpainting direction', *args=(), **kwargs={})
61 self.qcheckboxes = []
62 for opt in self.options_cfg:
63 checkbox = _QCheckBox(opt)
64 self.qcheckboxes.append(checkbox)
65 self.row.addWidget(checkbox)
checkbox undefined
global _QCheckBox = <class 'PyQt5.QtWidgets.QCheckBox'>
opt = ['left', 'left']
TypeError: arguments did not match any overloaded call:
QCheckBox(parent: QWidget = None): argument 1 has unexpected type 'list'
QCheckBox(str, parent: QWidget = None): argument 1 has unexpected type 'list'
cause = None
class = <class 'TypeError'>
context = None
delattr = <method-wrapper 'delattr' of TypeError object>
dict = {}
dir =
doc = 'Inappropriate argument type.'
eq = <method-wrapper 'eq' of TypeError object>
format =
ge = <method-wrapper 'ge' of TypeError object>
getattribute = <method-wrapper 'getattribute' of TypeError object>
gt = <method-wrapper 'gt' of TypeError object>
hash = <method-wrapper 'hash' of TypeError object>
init = <method-wrapper 'init' of TypeError object>
init_subclass =
le = <method-wrapper 'le' of TypeError object>
lt = <method-wrapper 'lt' of TypeError object>
ne = <method-wrapper 'ne' of TypeError object>
new =
reduce =
reduce_ex =
repr = <method-wrapper 'repr' of TypeError object>
setattr = <method-wrapper 'setattr' of TypeError object>
setstate =
sizeof =
str = <method-wrapper 'str' of TypeError object>
subclasshook =
suppress_context = False
traceback =
args = ("arguments did not match any overloaded call:\n Q...et = None): argument 1 has unexpected type 'list'",)
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 "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\docker.py", line 29, in
script.config_updated.connect(lambda: self.update_interface())
File "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\docker.py", line 25, in update_interface
self.page_widget.cfg_init()
File "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\img2img.py", line 25, in cfg_init
super(Img2ImgPage, self).cfg_init()
File "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\img_base.py", line 73, in cfg_init
self.ext_layout.cfg_init()
File "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\extension.py", line 118, in cfg_init
self._init_ext_widgets()
File "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\extension.py", line 109, in _init_ext_widgets
widget = ExtWidget(script.ext_cfg, self.ext_type, ext_name)
File "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\pages\extension.py", line 59, in init
w = QMultiCheckBoxLayout(ext_cfg, o["opts"], k, o["label"])
File "C:\Users\DT\AppData\Roaming\krita\pykrita\krita_diff\widgets\checkbox.py", line 63, in init
checkbox = _QCheckBox(opt)
TypeError: arguments did not match any overloaded call:
QCheckBox(parent: QWidget = None): argument 1 has unexpected type 'list'
QCheckBox(str, parent: QWidget = None): argument 1 has unexpected type 'list'

You should check out my fork. This issue has been fixed yesterday.

I don't like basically advertising on someone else's thing, but since interpause has been silent for a while and in the interest of people being able to actually use the plugin, I think it's fine.