Can't set external Python source editor

   1968   1   0
User Avatar
Member
4 posts
Joined: Sept. 2017
Offline
When I click Windows > External Python Source EditorI get a pop-up which says that an editor is not set if I'd like to pick one, I click "yes" and then get the following error:

Traceback (most recent call last):
  File "<stdin>", line 11, in <module>
  File "C:/Program Files/Side Effects Software/sidefx_packages/SideFXLabs18.5/scripts/python\HoudiniExprEditor\ParmWatcher.py", line 473, in add_watcher
    vsc = get_external_editor()
  File "C:/Program Files/Side Effects Software/sidefx_packages/SideFXLabs18.5/scripts/python\HoudiniExprEditor\ParmWatcher.py", line 160, in get_external_editor
    return set_external_editor()
  File "C:/Program Files/Side Effects Software/sidefx_packages/SideFXLabs18.5/scripts/python\HoudiniExprEditor\ParmWatcher.py", line 105, in set_external_editor
    r = QtWidgets.QFileDialog.getOpenFileName(hou.ui.mainWindow(),
AttributeError: 'ui' object has no attribute 'mainWindow'

Any tips on how to solve this?
Edited by paolo1990 - Sept. 29, 2021 11:59:58
User Avatar
Member
4 posts
Joined: Sept. 2017
Offline
Okay, I solved this, sorry for not actually trying to solve this on my own before posting this.

Anyway, here's my solution:
The error AttributeError: 'ui' object has no attribute 'mainWindow'made me want to check what's the method's real name. First I opened the Python shell inside Houdini and then started typing hou.ui.mai..and the shell automatically suggested hou.ui.mainQtWindow()which made me think they updated the method's name, but forgot to change it in the script that sets the external editor.
So I went and opened C:/Program Files/Side Effects Software/sidefx_packages/SideFXLabs18.5/scripts/python\HoudiniExprEditor\ParmWatcher.pyand just renamed the method that's called on the 105th line and restarted Houdini.
It now works just fine.
Edited by paolo1990 - Sept. 29, 2021 12:08:11
  • Quick Links