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

# Error: 'PySide2.QtWidgets.QShortcut' called with wrong argument types: #1

Closed
tccoleman opened this issue Aug 24, 2021 · 3 comments
Closed

Comments

@tccoleman
Copy link

tccoleman commented Aug 24, 2021

Windows 10
Maya 2020.4

Ran the Drag 'n Drop Installer and ran the command:

from weights_editor_tool import weights_editor
weights_editor.run()

# Error: 'PySide2.QtWidgets.QShortcut' called with wrong argument types:
#   PySide2.QtWidgets.QShortcut(long, QWidget)
# Supported signatures:
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, Callable, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, str=None, str=None, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtWidgets.QWidget)
# Traceback (most recent call last):
#   File "<maya console>", line 2, in <module>
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 1799, in run
#     WeightsEditor.run()
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 116, in run
#     inst = cls()
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 111, in __init__
#     self.register_shortcuts()
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor.py", line 689, in register_shortcuts
#     hotkey.key_code(), hotkey.func))
#   File "C:/Users/colem/OneDrive/Documents/maya/scripts\weights_editor_tool\weights_editor_utils.py", line 35, in create_shortcut
#     shortcut = QtWidgets.QShortcut(key_sequence, get_maya_window())
# TypeError: 'PySide2.QtWidgets.QShortcut' called with wrong argument types:
#   PySide2.QtWidgets.QShortcut(long, QWidget)
# Supported signatures:
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, Callable, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtGui.QKeySequence, PySide2.QtWidgets.QWidget, str=None, str=None, PySide2.QtCore.Qt.ShortcutContext=PySide2.QtCore.Qt.ShortcutContext.WindowShortcut)
#   PySide2.QtWidgets.QShortcut(PySide2.QtWidgets.QWidget) #
@theRussetPotato
Copy link
Owner

That's weird, since I just tested with a fresh install of Maya 2020 with no issues.
I did update the tool to see if that would fix it, so you can try the latest release.
Thanks for reporting this in.

@tccoleman
Copy link
Author

Your fix worked, thanks for your quick response and this useful skin weighting tool. Look forward to using it. Tim

@theRussetPotato
Copy link
Owner

Glad to hear it's working on your end!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants