Bug 392059 - Failed to run Ten Brushes script
Summary: Failed to run Ten Brushes script
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Scripting (other bugs)
Version First Reported In: 4.0
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-19 14:09 UTC by Aleksey Samoilov
Modified: 2021-10-28 11:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksey Samoilov 2018-03-19 14:09:14 UTC
Ten Brushes script failed to start. Log https://pastebin.com/76TPxL3k
Comment 1 wolthera 2018-03-19 14:14:33 UTC
Copypasting said log here:

TypeError
Python 3.5.3: /usr/bin/python3
Mon Mar 19 17:55:29 2018
 
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/share/krita/pykrita/tenbrushes/tenbrushes.py in initialize(self=<tenbrushes.tenbrushes.TenBrushesExtension object>)
   34     def initialize(self):
   35         self.uitenbrushes = uitenbrushes.UITenBrushes()
   36         self.uitenbrushes.initialize(self)
   37
   38     def readSettings(self):
self = <tenbrushes.tenbrushes.TenBrushesExtension object>
self.uitenbrushes = <tenbrushes.uitenbrushes.UITenBrushes object>
self.uitenbrushes.initialize = <bound method UITenBrushes.initialize of <tenbrushes.uitenbrushes.UITenBrushes object>>
 
 /usr/share/krita/pykrita/tenbrushes/uitenbrushes.py in initialize(self=<tenbrushes.uitenbrushes.UITenBrushes object>, tentbrushes=<tenbrushes.tenbrushes.TenBrushesExtension object>)
   38         self.tentbrushes = tentbrushes
   39
   40         self.loadButtons()
   41
   42         self.vbox.addLayout(self.hbox)
self = <tenbrushes.uitenbrushes.UITenBrushes object>
self.loadButtons = <bound method UITenBrushes.loadButtons of <tenbrushes.uitenbrushes.UITenBrushes object>>
 
 /usr/share/krita/pykrita/tenbrushes/uitenbrushes.py in loadButtons(self=<tenbrushes.uitenbrushes.UITenBrushes object>)
   69             buttonLayout.addWidget(button)
   70
   71             label = QLabel(self.tentbrushes.actions[index].shortcut())
   72             label.setAlignment(Qt.AlignHCenter)
   73             buttonLayout.addWidget(label)
label undefined
global QLabel = <class 'PyQt5.QtWidgets.QLabel'>
self = <tenbrushes.uitenbrushes.UITenBrushes object>
self.tentbrushes = <tenbrushes.tenbrushes.TenBrushesExtension object>
self.tentbrushes.actions = [<PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>, <PyQt5.QtWidgets.QWidgetAction object>]
index = 0
].shortcut undefined
TypeError: arguments did not match any overloaded call:
  QLabel(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()): argument 1 has unexpected type 'QKeySequence'
  QLabel(str, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()): argument 1 has unexpected type 'QKeySequence'
    __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>
    __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 = ("arguments did not match any overloaded call:\n  Q...)): argument 1 has unexpected type 'QKeySequence'",)
    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 "/usr/share/krita/pykrita/tenbrushes/tenbrushes.py", line 36, in initialize
    self.uitenbrushes.initialize(self)
  File "/usr/share/krita/pykrita/tenbrushes/uitenbrushes.py", line 40, in initialize
    self.loadButtons()
  File "/usr/share/krita/pykrita/tenbrushes/uitenbrushes.py", line 71, in loadButtons
    label = QLabel(self.tentbrushes.actions[index].shortcut())
TypeError: arguments did not match any overloaded call:
  QLabel(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()): argument 1 has unexpected type 'QKeySequence'
  QLabel(str, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()): argument 1 has unexpected type 'QKeySequence'
Comment 2 Halla Rempt 2018-03-19 14:32:25 UTC
Git commit 8caa7dcd9b9308af8da9f2b1cbae0e6bc1e84c5f by Boudewijn Rempt.
Committed on 19/03/2018 at 14:31.
Pushed by rempt into branch 'master'.

Fix change from Action to QAction

shortcut is no longer a string but a QKeySequence, so it needs
a toString()
Related: bug 392060

M  +9    -9    plugins/python/tenbrushes/uitenbrushes.py
M  +1    -1    plugins/python/tenscripts/uitenscripts.py

https://commits.kde.org/krita/8caa7dcd9b9308af8da9f2b1cbae0e6bc1e84c5f
Comment 3 Halla Rempt 2018-03-19 14:32:43 UTC
Git commit 7aa7373e4935689c5bdd90da760771ec2de1bc1b by Boudewijn Rempt.
Committed on 19/03/2018 at 14:32.
Pushed by rempt into branch 'krita/4.0'.

Fix change from Action to QAction

shortcut is no longer a string but a QKeySequence, so it needs
a toString()
Related: bug 392060

M  +9    -9    plugins/python/tenbrushes/uitenbrushes.py
M  +1    -1    plugins/python/tenscripts/uitenscripts.py

https://commits.kde.org/krita/7aa7373e4935689c5bdd90da760771ec2de1bc1b