Deprecation Warnings Coming from Houdini's Python Libraries

   3057   3   1
User Avatar
Member
12 posts
Joined: 6月 2016
Offline
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

Thanks!
User Avatar
Member
12 posts
Joined: 6月 2016
Offline
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.
User Avatar
Member
12 posts
Joined: 6月 2016
Offline
Finally tracked the problem down to a single python import.

import pyseq
http://pyseq.rsgalloway.com/ [pyseq.rsgalloway.com]


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.
User Avatar
Member
4 posts
Joined: 4月 2015
Offline
Hi Adam,

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
  • Quick Links