Deprecation Warnings Coming from Houdini's Python Libraries
Oct. 11, 2019 9:29 p.m.
I'm wondering if someone has any hints about how I can debug an issue I'm running into.
I'm upgrading from Houdini 16.5 to Houdini 17.5. When I load a set of python scripts I've built to work in Houdini 16.5 I get the following warnings in the console when Houdini starts up:
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.360/houdini/python2.7libs\nodegraphfastfind.py:35: DeprecationWarning: createQtIcon is deprecated ADD_ICON = hou.ui.createQtIcon("BUTTONS_list_add", 16, 16) C:/PROGRA~1/SIDEEF~1/HOUDIN~1.360/houdini/python2.7libs\nodegraphfastfind.py:36: DeprecationWarning: createQtIcon is deprecated DELETE_ICON = hou.ui.createQtIcon("BUTTONS_list_delete", 16, 16) C:/PROGRA~1/SIDEEF~1/HOUDIN~1.360/houdini/python2.7libs\nodegraphfastfind.py:37: DeprecationWarning: createQtIcon is deprecated CHOOSER_ICON = hou.ui.createQtIcon("BUTTONS_chooser_node", 16, 16) C:/PROGRA~1/SIDEEF~1/HOUDIN~1.360/houdini/python2.7libs\nodegraphfastfind.py:38: DeprecationWarning: createQtIcon is deprecated PIN_ICON = hou.ui.createQtIcon("NETVIEW_pin_in", 16, 16)
Everything seems to work fine, but it looks messy for those warnings to be showing up. Why would Houdini's own python libs be calling these deprecated functions? Has anyone else seen this? My scripts aren't using any hou.ui functions. I'm barely using hou at all.
Does anyone have any ideas about how I can debug this?
Houdini 17.5.360 Windows 10
Oct. 14, 2019 4:16 p.m.
Interestingly middle clicks in the node graph produce a similar warning after adding the scripts.
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.360/houdini/python2.7libs\nodegraphui.py:254: DeprecationWarning: createQtIcon is deprecated icon = hou.ui.createQtIcon(iconname, self.width(), self.height())
Still debugging, will update when I find a solution.
Nov. 6, 2019 12:42 p.m.
Finally tracked the problem down to a single python import.
Something about importing this package makes Houdini start using deprecated functions. Maybe some out of order import or namespace overlap?
If anyone else can reproduce it would be good to know. Just install pyseq with pip and import it in your pythonrc.py.
For my purposes pyseq was nonvital so I'm removing it for now.
Joined: April 2015 Offline
Feb. 12, 2020 7:41 a.m.
thank you for sharing! Looks like pyseq activates the deprecation warnings - we had the same problem. The solution is to use these lines : import warnings warnings.simplefilter('ignore', DeprecationWarning) after the pyseq import. Best, Michael