https://bugs.kde.org/show_bug.cgi?id=488765
Bug ID: 488765 Summary: Comic manager raises exception on null paths Classification: Applications Product: krita Version: 5.2.2 Platform: Microsoft Windows OS: Microsoft Windows Status: REPORTED Severity: minor Priority: NOR Component: General Assignee: krita-bugs-n...@kde.org Reporter: elend...@gmail.com Target Milestone: --- SUMMARY STEPS TO REPRODUCE 1. Open Krita 2. Create a new document 3. On the "comic management panel" Right click on "Add new page from template". 4. Cancel the dialog OBSERVED RESULT An exception ocurred while running the script. ValueError: no path specified ValueError Python 3.10.7: C:\Program Files\Krita (x64)\bin\krita.exe Wed Jun 19 20:50:12 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:\Program Files\Krita (x64)\share\krita\pykrita\comics_project_management_tools\comics_project_manager_docker.py in slot_add_new_page_from_template(self=<comics_project_management_tools.comics_project_manager_docker.comics_project_manager_docker object>) 609 def slot_add_new_page_from_template(self): 610 if "templateLocation" not in self.setupDictionary.keys(): 611 self.setupDictionary["templateLocation"] = os.path.relpath(QFileDialog.getExistingDirectory(caption=i18n("Where are the templates located?"), options=QFileDialog.ShowDirsOnly), self.projecturl) 612 613 templateDir = os.path.join(self.projecturl, self.setupDictionary["templateLocation"]) self = <comics_project_management_tools.comics_project_manager_docker.comics_project_manager_docker object> self.setupDictionary = {} global os = <module 'os' from 'C:\\Program Files\\Krita (x64)\\python\\python310.zip\\os.pyc'> os.path = <module 'ntpath' from 'C:\\Program Files\\Krita (x64)\\python\\python310.zip\\ntpath.pyc'> os.path.relpath = <function relpath> global QFileDialog = <class 'PyQt5.QtWidgets.QFileDialog'> QFileDialog.getExistingDirectory = <built-in function getExistingDirectory> caption undefined builtini18n = <built-in function krita_i18n> options undefined QFileDialog.ShowDirsOnly = 1 self.projecturl = None C:\Program Files\Krita (x64)\ntpath.py in relpath(path='', start='.') ValueError: no path specified __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> __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> args = ('no path specified',) 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 "C:\Program Files\Krita (x64)\share\krita\pykrita\comics_project_management_tools\comics_project_manager_docker.py", line 611, in slot_add_new_page_from_template self.setupDictionary["templateLocation"] = os.path.relpath(QFileDialog.getExistingDirectory(caption=i18n("Where are the templates located?"), options=QFileDialog.ShowDirsOnly), self.projecturl) File "ntpath.py", line 735, in relpath ValueError: no path specified EXPECTED RESULT The script just should ignore null paths SOFTWARE/OS VERSIONS Windows: Windows 11 21H2 Version Krita: 5.2.2 -- You are receiving this mail because: You are watching all bug changes.