https://bugs.kde.org/show_bug.cgi?id=478341
Bug ID: 478341 Summary: Errors trying to run "Hello World" in Scripter Debugger Classification: Applications Product: krita Version: unspecified Platform: Microsoft Windows OS: Microsoft Windows Status: REPORTED Severity: normal Priority: NOR Component: Scripting Assignee: krita-bugs-n...@kde.org Reporter: gecko...@gmx.de Target Milestone: --- Krita 5.2.2 (can't select this version in the bugtracker), Windows 10 64 Bit This simple script runs fine when pressing the "Run" button. print("Hello World") But pressing the "Debug" button instead results in two error dialogs popping up. Dialog 1 Script error - Krita An exception occurred while running the script. TypeError: cannot pickle 'ScripterExtension' object TypeError Python 3.10.7: C:\Program Files\Krita (x64)\bin\krita.exe Sun Dec 10 09:52:45 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:\Program Files\Krita (x64)\share\krita\pykrita\scripter\ui_scripter\actions\debugaction\debugaction.py in debug(self=<scripter.ui_scripter.actions.debugaction.debugaction.DebugAction object>) 33 if self.scripter.uicontroller.invokeAction('save'): 34 self.scripter.uicontroller.setActiveWidget(i18n('Debugger')) 35 self.scripter.debugcontroller.start(self.scripter.documentcontroller.activeDocument) 36 widget = self.scripter.uicontroller.findTabWidget(i18n('Debugger')) 37 widget.startDebugger() self = <scripter.ui_scripter.actions.debugaction.debugaction.DebugAction object> self.scripter = <scripter.scripter.ScripterExtension object> self.scripter.debugcontroller = <scripter.debugcontroller.DebugController object> self.scripter.debugcontroller.start = <bound method DebugController.start of <scripter.debugcontroller.DebugController object>> self.scripter.documentcontroller = <scripter.documentcontroller.DocumentController object> self.scripter.documentcontroller.activeDocument = <scripter.document_scripter.document.Document object> C:\Program Files\Krita (x64)\share\krita\pykrita\scripter\debugcontroller.py in start(self=<scripter.debugcontroller.DebugController object>, document=<scripter.document_scripter.document.Document object>) 23 self.setCmd(compile(document.data, document.filePath, "exec")) 24 self._debugger = debugger.Debugger(self.scripter, self._cmd) 25 self._debugger.debugprocess.start() 26 loop = asyncio.get_event_loop() 27 loop.run_until_complete(self._debugger.start()) self = <scripter.debugcontroller.DebugController object> self._debugger = <scripter.debugger_scripter.debugger.Debugger object> self._debugger.debugprocess = <Process name='Process-1' parent=8416 initial> self._debugger.debugprocess.start = <bound method BaseProcess.start of <Process name='Process-1' parent=8416 initial>> C:\Program Files\Krita (x64)\multiprocessing\process.py in start(self=<Process name='Process-1' parent=8416 initial>) C:\Program Files\Krita (x64)\multiprocessing\context.py in _Popen(process_obj=<Process name='Process-1' parent=8416 initial>) C:\Program Files\Krita (x64)\multiprocessing\context.py in _Popen(process_obj=<Process name='Process-1' parent=8416 initial>) C:\Program Files\Krita (x64)\multiprocessing\popen_spawn_win32.py in __init__(self=<multiprocessing.popen_spawn_win32.Popen object>, process_obj=<Process name='Process-1' parent=8416 initial>) C:\Program Files\Krita (x64)\multiprocessing\reduction.py in dump(obj=<Process name='Process-1' parent=8416 initial>, file=<_io.BufferedWriter name=3>, protocol=None) TypeError: cannot pickle 'ScripterExtension' object __cause__ = None __class__ = <class 'TypeError'> __context__ = None __delattr__ = <method-wrapper '__delattr__' of TypeError object> __dict__ = {} __dir__ = <built-in method __dir__ of TypeError object> __doc__ = 'Inappropriate argument type.' __eq__ = <method-wrapper '__eq__' of TypeError object> __format__ = <built-in method __format__ of TypeError object> __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__ = <built-in method __init_subclass__ of type object> __le__ = <method-wrapper '__le__' of TypeError object> __lt__ = <method-wrapper '__lt__' of TypeError object> __ne__ = <method-wrapper '__ne__' of TypeError object> __new__ = <built-in method __new__ of type object> __reduce__ = <built-in method __reduce__ of TypeError object> __reduce_ex__ = <built-in method __reduce_ex__ of TypeError object> __repr__ = <method-wrapper '__repr__' of TypeError object> __setattr__ = <method-wrapper '__setattr__' of TypeError object> __setstate__ = <built-in method __setstate__ of TypeError object> __sizeof__ = <built-in method __sizeof__ of TypeError object> __str__ = <method-wrapper '__str__' of TypeError object> __subclasshook__ = <built-in method __subclasshook__ of type object> __suppress_context__ = False __traceback__ = <traceback object> args = ("cannot pickle 'ScripterExtension' object",) with_traceback = <built-in method with_traceback of TypeError object> 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)\share\krita\pykrita\scripter\ui_scripter\actions\debugaction\debugaction.py", line 35, in debug self.scripter.debugcontroller.start(self.scripter.documentcontroller.activeDocument) File "C:\Program Files\Krita (x64)\share\krita\pykrita\scripter\debugcontroller.py", line 25, in start self._debugger.debugprocess.start() File "multiprocessing\process.py", line 121, in start File "multiprocessing\context.py", line 224, in _Popen File "multiprocessing\context.py", line 336, in _Popen File "multiprocessing\popen_spawn_win32.py", line 93, in __init__ File "multiprocessing\reduction.py", line 60, in dump TypeError: cannot pickle 'ScripterExtension' object Dialog 2 --------------------------- Krita --------------------------- krita: Unknown options: c, multiprocessing-fork. --------------------------- OK --------------------------- -- You are receiving this mail because: You are watching all bug changes.