Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After plugin install Krita don't start #7

Open
valden80 opened this issue Nov 1, 2022 · 4 comments
Open

After plugin install Krita don't start #7

valden80 opened this issue Nov 1, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@valden80
Copy link

valden80 commented Nov 1, 2022

Krita 5.1.1, Manjaro Linux.

After installing lastest version, of plugin, Krita don't start anymore. It's show up this error, then close:

TypeError
Python 3.10.7: /usr/bin/python3
Tue Nov 1 22:04:15 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.

/usr/lib/krita-python-libs/krita/dockwidgetfactory.py in createDockWidget(self=<krita.dockwidgetfactory.DockWidgetFactory object>)
14 super(DockWidgetFactory, self).init(_id, _dockPosition)
15 self.klass = _klass
16
17 def createDockWidget(self):
18 return self.klass()
self = <krita.dockwidgetfactory.DockWidgetFactory object>
self.klass = <class 'Defuser.MyDocker.MyDocker'>

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in init(self=<Defuser.MyDocker.MyDocker object>)
296 super().init()
297 # src/MyDocker.hx:28
298 host_App.init(self)
299 # src/MyDocker.hx:31
300 # src/MyDocker.hx:31
global host_App = <class 'Defuser.MyDocker.host_App'>
host_App.init =
self = <Defuser.MyDocker.MyDocker object>

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in init(v=<Defuser.MyDocker.MyDocker object>)
2602 req.onData = _hx_local_15
2603 # src/host/App.hx:140
2604 req.request(False)
2605 # src/host/App.hx:143
2606 v.setWindowTitle("Defuser")
req = <Defuser.MyDocker.sys_Http object>
req.request = <bound method sys_Http.request of <Defuser.MyDocker.sys_Http object>>

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in request(self=<Defuser.MyDocker.sys_Http object>, post=False)
5247 # C:\HaxeToolkit\haxe\std/sys/Http.hx:69
5248 if (not err):
5249 self.success(output.getBytes())
5250
5251 def customRequest(self,post,api,sock = None,method = None):
self = <Defuser.MyDocker.sys_Http object>
self.success = <bound method haxe_http_HttpBase.success of <Defuser.MyDocker.sys_Http object>>
output = <Defuser.MyDocker.haxe_io_BytesOutput object>
output.getBytes = <bound method haxe_io_BytesOutput.getBytes of <Defuser.MyDocker.haxe_io_BytesOutput object>>

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in success(self=<Defuser.MyDocker.sys_Http object>, data=<Defuser.MyDocker.haxe_io_Bytes object>)
2119 # C:\HaxeToolkit\haxe\std/haxe/http/HttpBase.hx:235
2120 if self.hasOnData():
2121 self.onData(self.get_responseData())
2122 # C:\HaxeToolkit\haxe\std/haxe/http/HttpBase.hx:238
2123 self.onBytes(self.responseBytes)
self = <Defuser.MyDocker.sys_Http object>
self.onData = <function host_App.init.._hx_local_15>
self.get_responseData = <bound method haxe_http_HttpBase.get_responseData of <Defuser.MyDocker.sys_Http object>>

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in _hx_local_15(data_out='\n<html lang="en" style="margin: 0....padding = "0";\n\t\t\t}\n\t\t</script>\n\t\n')
2599 print(str(host_UI.tags.h.get("img2img",None)))
2600 # src/host/App.hx:137
2601 host_UI.createInterface()
2602 req.onData = _hx_local_15
2603 # src/host/App.hx:140
global host_UI = <class 'Defuser.MyDocker.host_UI'>
host_UI.createInterface =

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in createInterface()
2772 host_UI.makeTab("txt2img")
2773 # src/host/UI.python.hx:66
2774 host_UI.makeTab("img2img")
2775 # src/host/UI.python.hx:69
2776 # src/host/UI.python.hx:69
global host_UI = <class 'Defuser.MyDocker.host_UI'>
host_UI.makeTab =

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in makeTab(mode='img2img')
2854 _g = (_g + 1)
2855 # src/host/UI.python.hx:116
2856 widget = host_UI.makeComponent(comp,mode)
2857 # src/host/UI.python.hx:117
2858 formlayout.addWidget(widget)
widget = <PyQt5.QtWidgets.QGroupBox object>
global host_UI = <class 'Defuser.MyDocker.host_UI'>
host_UI.makeComponent =
comp = {'id': 335, 'props': {'label': 'Mask precision',...param_name': 'mask_precision'}, 'type': 'slider'}
mode = 'img2img'

/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py in makeComponent(component={'id': 335, 'props': {'label': 'Mask precision',...param_name': 'mask_precision'}, 'type': 'slider'}, mode='img2img')
3250 raise "Class cast error"
3251 return _hx_local_21
3252 input3.setMinimum(_hx_local_22())
3253 # src/host/UI.python.hx:361
3254 def _hx_local_24():
input3 = <PyQt5.QtWidgets.QSpinBox object>
input3.setMinimum =
_hx_local_22 = <function host_UI.makeComponent.._hx_local_22>
TypeError: setMinimum(self, int): argument 1 has unexpected type 'float'
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 = ("setMinimum(self, int): argument 1 has unexpected type 'float'",)
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 "/usr/lib/krita-python-libs/krita/dockwidgetfactory.py", line 18, in createDockWidget
return self.klass()
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 298, in init
host_App.init(self)
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 2604, in init
req.request(False)
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 5249, in request
self.success(output.getBytes())
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 2121, in success
self.onData(self.get_responseData())
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 2601, in _hx_local_15
host_UI.createInterface()
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 2774, in createInterface
host_UI.makeTab("img2img")
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 2856, in makeTab
widget = host_UI.makeComponent(comp,mode)
File "/home/usersd/.local/share/krita/pykrita/Defuser/MyDocker.py", line 3252, in makeComponent
input3.setMinimum(_hx_local_22())
TypeError: setMinimum(self, int): argument 1 has unexpected type 'float'

@internationalTD
Copy link
Owner

I installed the latest version of txt2mask from here , since I found no other script/extension that adds a "'Mask precision" slider, but I was unable to reproduce this error as of yet. I'll clean the UI generation code and see if that fixes it.

@if-ai
Copy link

if-ai commented Nov 8, 2022

I installed the latest version of txt2mask from here , since I found no other script/extension that adds a "'Mask precision" slider, but I was unable to reproduce this error as of yet. I'll clean the UI generation code and see if that fixes it.

I installed text2Mask and still have the same problem here is the log . The first time I install it defuser pane was empty without icons I try installing from file the hopeful fix but didn't worked so I udated krita from 5.1 to 5.1.3 but now it doesn't start and have this error AttributeError
Python 3.8.1: C:\Program Files\Krita (x64)\bin\krita.exe
Tue Nov 8 12:51:15 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.

C:\Program Files\Krita (x64)\lib\krita-python-libs\krita\dockwidgetfactory.py in createDockWidget(self=<krita.dockwidgetfactory.DockWidgetFactory object>)
14 super(DockWidgetFactory, self).init(_id, _dockPosition)
15 self.klass = _klass
16
17 def createDockWidget(self):
18 return self.klass()
self = <krita.dockwidgetfactory.DockWidgetFactory object>
self.klass = <class 'Defuser.MyDocker.MyDocker'>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in init(self=<Defuser.MyDocker.MyDocker object>)
296 super().init()
297 # src/MyDocker.hx:28
298 host_App.init(self)
299 # src/MyDocker.hx:31
300 # src/MyDocker.hx:31
global host_App = <class 'Defuser.MyDocker.host_App'>
host_App.init =
self = <Defuser.MyDocker.MyDocker object>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in init(v=<Defuser.MyDocker.MyDocker object>)
2602 req.onData = _hx_local_15
2603 # src/host/App.hx:140
2604 req.request(False)
2605 # src/host/App.hx:143
2606 v.setWindowTitle("Defuser")
req = <Defuser.MyDocker.sys_Http object>
req.request = <bound method sys_Http.request of <Defuser.MyDocker.sys_Http object>>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in request(self=<Defuser.MyDocker.sys_Http object>, post=False)
5247 # C:\HaxeToolkit\haxe\std/sys/Http.hx:69
5248 if (not err):
5249 self.success(output.getBytes())
5250
5251 def customRequest(self,post,api,sock = None,method = None):
self = <Defuser.MyDocker.sys_Http object>
self.success = <bound method haxe_http_HttpBase.success of <Defuser.MyDocker.sys_Http object>>
output = <Defuser.MyDocker.haxe_io_BytesOutput object>
output.getBytes = <bound method haxe_io_BytesOutput.getBytes of <Defuser.MyDocker.haxe_io_BytesOutput object>>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in success(self=<Defuser.MyDocker.sys_Http object>, data=<Defuser.MyDocker.haxe_io_Bytes object>)
2119 # C:\HaxeToolkit\haxe\std/haxe/http/HttpBase.hx:235
2120 if self.hasOnData():
2121 self.onData(self.get_responseData())
2122 # C:\HaxeToolkit\haxe\std/haxe/http/HttpBase.hx:238
2123 self.onBytes(self.responseBytes)
self = <Defuser.MyDocker.sys_Http object>
self.onData = <function host_App.init.._hx_local_15>
self.get_responseData = <bound method haxe_http_HttpBase.get_responseData of <Defuser.MyDocker.sys_Http object>>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in _hx_local_15(data_out='\n<html lang="en" style="margin: 0....padding = "0";\n\t\t\t}\n\t\t</script>\n\t\n')
2599 print(str(host_UI.tags.h.get("img2img",None)))
2600 # src/host/App.hx:137
2601 host_UI.createInterface()
2602 req.onData = _hx_local_15
2603 # src/host/App.hx:140
global host_UI = <class 'Defuser.MyDocker.host_UI'>
host_UI.createInterface =

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in createInterface()
2800 host_UI.makeTab("inpaint")
2801 # src/host/UI.python.hx:77
2802 host_UI.makeTab("outpainting_mk2")
2803
2804 @staticmethod
global host_UI = <class 'Defuser.MyDocker.host_UI'>
host_UI.makeTab =

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in makeTab(mode='outpainting_mk2')
2974 req.onStatus = _hx_local_6
2975 # src/host/UI.python.hx:203
2976 req.request(True)
2977
2978 @staticmethod
req = <Defuser.MyDocker.sys_Http object>
req.request = <bound method sys_Http.request of <Defuser.MyDocker.sys_Http object>>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in request(self=<Defuser.MyDocker.sys_Http object>, post=True)
5247 # C:\HaxeToolkit\haxe\std/sys/Http.hx:69
5248 if (not err):
5249 self.success(output.getBytes())
5250
5251 def customRequest(self,post,api,sock = None,method = None):
self = <Defuser.MyDocker.sys_Http object>
self.success = <bound method haxe_http_HttpBase.success of <Defuser.MyDocker.sys_Http object>>
output = <Defuser.MyDocker.haxe_io_BytesOutput object>
output.getBytes = <bound method haxe_io_BytesOutput.getBytes of <Defuser.MyDocker.haxe_io_BytesOutput object>>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in success(self=<Defuser.MyDocker.sys_Http object>, data=<Defuser.MyDocker.haxe_io_Bytes object>)
2119 # C:\HaxeToolkit\haxe\std/haxe/http/HttpBase.hx:235
2120 if self.hasOnData():
2121 self.onData(self.get_responseData())
2122 # C:\HaxeToolkit\haxe\std/haxe/http/HttpBase.hx:238
2123 self.onBytes(self.responseBytes)
self = <Defuser.MyDocker.sys_Http object>
self.onData = <function host_UI.makeTab.._hx_local_5>
self.get_responseData = <bound method haxe_http_HttpBase.get_responseData of <Defuser.MyDocker.sys_Http object>>

C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py in _hx_local_5(data_out='{"data":[{"visible":false,"type":"update"},{...ing":false,"duration":0.0,"average_duration":0.0}')
2959 # src/host/UI.python.hx:187
2960 value = Reflect.field((data[i] if i >= 0 and i < len(data) else None),"visible")
2961 setattr(tag_props,(("hx" + "visible") if (("visible" in python_Boot.keywords)) else (("hx" + "visible") if (((((len("visible") > 2) and ((ord("visible"[0]) == 95))) and ((ord("visible"[1]) == 95))) and ((ord("visible"[(len("visible") - 1)]) != 95)))) else "visible")),value)
2962 # src/host/UI.python.hx:188
2963 if (Reflect.field((vismap[i] if i >= 0 and i < len(vismap) else None),"container") is not None):
builtinsetattr =
tag_props = None
global python_Boot = <class 'Defuser.MyDocker.python_Boot'>
python_Boot.keywords = {'False', 'None', 'True', 'and', 'as', 'assert', ...}
builtinlen =
builtinord =
value = False
AttributeError: 'NoneType' object has no attribute 'visible'
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 =
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 =
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 'visible'",)
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:\Program Files\Krita (x64)\lib\krita-python-libs\krita\dockwidgetfactory.py", line 18, in createDockWidget
return self.klass()
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 298, in init
host_App.init(self)
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 2604, in init
req.request(False)
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 5249, in request
self.success(output.getBytes())
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 2121, in success
self.onData(self.get_responseData())
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 2601, in _hx_local_15
host_UI.createInterface()
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 2802, in createInterface
host_UI.makeTab("outpainting_mk2")
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 2976, in makeTab
req.request(True)
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 5249, in request
self.success(output.getBytes())
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 2121, in success
self.onData(self.get_responseData())
File "C:\Users\SoyYo\AppData\Roaming\krita\pykrita\Defuser\MyDocker.py", line 2961, in _hx_local_5
setattr(tag_props,(("hx" + "visible") if (("visible" in python_Boot.keywords)) else (("hx" + "visible") if (((((len("visible") > 2) and ((ord("visible"[0]) == 95))) and ((ord("visible"[1]) == 95))) and ((ord("visible"[(len("visible") - 1)]) != 95)))) else "visible")),value)
AttributeError: 'NoneType' object has no attribute 'visible'

@internationalTD
Copy link
Owner

Thank you for reporting this jvoxel. I was able to reproduce your error. Introduced with a recent commit in auto's webui somewhere. I have an idea about a fix already.

Just so we are clear: I inferred that valden80 had txt2mask from his error log, but that script is NOT needed for defuser to start.
And as far as I can tell, it does not have anything to do with your error on startup either.

@internationalTD internationalTD added the bug Something isn't working label Nov 8, 2022
@if-ai
Copy link

if-ai commented Nov 8, 2022

Hi thank you for looking at the issue. I wasn't sure it was the same error, just same behavior where krita stops after installation.
I do have 3 other krita SD plugins installed it might be that but none have the same name or folders so, I don't see why that would conflict.
I am interested on using your plugin because it seems to have a better workflow and outpainting from what I read on the github page.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants