Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
https://www.interstice.cloud
GNU General Public License v3.0
7k stars 347 forks source link

Script Error during switch between workspaces (image generation, upscaling, live preview and animation) #1233

Open Saladefroide opened 1 month ago

Saladefroide commented 1 month ago

Hello everyone!

I have this issue with the plugin since I personalized my Krita workspace and window layouts (for dual screen editing) I tried to relaunch Krita, but the error message appears again. Someone can help me? Thanks a lot 😁

An exception occurred while running the script. RuntimeError: wrapped C/C++ object of type WorkspaceSelectWidget has been deleted

"RuntimeError Python 3.10.7: C:\Program Files\Krita (x64)\bin\krita.exe Sun Sep 29 11:39:18 2024

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\adrug\AppData\Roaming\krita\pykrita\ai_diffusion\properties.py in set_py(value=<Workspace.generation: 0>) 152 def _setter(inst, property: str): 153 def set_py(value): 154 setattr(inst, property, value) 155 156 qt_setter_name = f"set{property.capitalize()}" builtinsetattr = inst = property = 'value' value = <Workspace.generation: 0>

C:\Users\adrug\AppData\Roaming\krita\pykrita\ai_diffusion\ui\widget.py in value(self=, workspace=<Workspace.generation: 0>) 724 def value(self, workspace: Workspace): 725 self._value = workspace 726 self.setIcon(self._icons[workspace]) 727 728 def _create_action(self, name: str, workspace: Workspace): self = self.setIcon = self._icons = {<Workspace.generation: 0>: , <Workspace.upscaling: 1>: , <Workspace.live: 2>: , <Workspace.animation: 3>: } workspace = <Workspace.generation: 0> RuntimeError: wrapped C/C++ object of type WorkspaceSelectWidget has been deleted cause = None class = <class 'RuntimeError'> context = None delattr = <method-wrapper 'delattr' of RuntimeError object> dict = {} dir = doc = 'Unspecified run-time error.' eq = <method-wrapper 'eq' of RuntimeError object> format = ge = <method-wrapper 'ge' of RuntimeError object> getattribute = <method-wrapper 'getattribute' of RuntimeError object> gt = <method-wrapper 'gt' of RuntimeError object> hash = <method-wrapper 'hash' of RuntimeError object> init = <method-wrapper 'init' of RuntimeError object> init_subclass = <built-in method init_subclass of type object> le = <method-wrapper 'le' of RuntimeError object> lt = <method-wrapper 'lt' of RuntimeError object> ne = <method-wrapper 'ne' of RuntimeError object> new = reduce = reduce_ex = <built-in method reduce_ex of RuntimeError object> repr = <method-wrapper 'repr' of RuntimeError object> setattr = <method-wrapper 'setattr' of RuntimeError object> setstate = sizeof = str = <method-wrapper 'str' of RuntimeError object> subclasshook = __suppress_context = False traceback__ = args = ('wrapped C/C++ object of type WorkspaceSelectWidget has been deleted',) 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\adrug\AppData\Roaming\krita\pykrita\ai_diffusion\properties.py", line 154, in set_py setattr(inst, property, value) File "C:\Users\adrug\AppData\Roaming\krita\pykrita\ai_diffusion\ui\widget.py", line 726, in value self.setIcon(self._icons[workspace]) RuntimeError: wrapped C/C++ object of type WorkspaceSelectWidget has been deleted"

Acly commented 1 month ago

I wasn't able to reproduce this, what are you doing exactly? Using multiple windows? Multiple views? Or just dragging dockers to a second screen?

Even if it doesn't produce an error I don't think multiple windows/views is working properly. But extending the window or placing the docker on a different screen should be fine.