No module named sidefx_stroke or kinefx.stateutils

   5494   14   4
User Avatar
Member
61 posts
Joined: Oct. 2013
Offline
On a fresh Houdini 19 install we were getting

ImportError: No module named sidefx_stroke
and
ImportError: No module named kinefx.stateutils

To fix this we had to add the following to our houdini.env
PYTHONPATH = $PYTHONPATH;$HFS/packages/kinefx/python2.7libs;$HFS/houdini/viewer_states;$HFS/packages/kinefx/viewer_states

Curious if this is expected behavior? Leaving it here in hopes that it helps anyone else experiencing the same issue.
Edited by blented - Nov. 20, 2021 10:06:15
Grant Miller
VFX Supervisor
Ingenuity Studios
User Avatar
Staff
441 posts
Joined: Feb. 2018
Offline
I just tried with H19.0.445, both modules should load as expected. You shouldn't have to add anything to PYTHONPATH.
Edited by mabelzile - Nov. 22, 2021 10:00:37
User Avatar
Member
61 posts
Joined: Oct. 2013
Offline
Thanks for checking, we'll look through our env more and try to figure out what's causing the hang-up.
Grant Miller
VFX Supervisor
Ingenuity Studios
User Avatar
Member
2 posts
Joined: Aug. 2013
Offline
Thanks for the fix Grant, this sorted out the same issue here (for 18.5, but we see it in 19 too).

I think for our case the bug may have been associated with this (once?) bug fix (in sidefx change log, for Houdini 18.0.363):


Fixed a bug where OTLs would fail to load on startup with errors like:
"ImportError: No module named sidefx_stroke"

When %HOMEDRIVE%%HOMEPATH% was set to the root of a drive, like Z:\

Maybe it has surfaced again?
User Avatar
Member
61 posts
Joined: Oct. 2013
Offline
Worth noting, on a fresh install w/ no tools we're still seeing this on 19.5

The above fix works, modified for python 3.9 as such:
PYTHONPATH = $PYTHONPATH;$HFS/packages/kinefx/python3.9libs;$HFS/houdini/viewer_states;$HFS/packages/kinefx/viewer_states

But we're getting a new error which we're still trying to track down:

Error running event handler:
Traceback (most recent call last):
  File "labs::Lop/karma::2.0, ViewerStateModule", line 18, in <module>
  File "C:\Program Files\Side Effects Software\Houdini 19.5.303.9\python39\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'ParseExrMetadata'

Error running event handler:
Traceback (most recent call last):
  File "labs::Lop/karma::2.0, opdef:/labs::Lop/karma::2.0?ViewerStateInstall", line 1, in <module>
  File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.9/houdini/python3.9libs\viewerstate\utils.py", line 948, in register_pystate_embedded
    raise ViewerStateException("createViewerStateTemplate not found in {}".format(node_type.sourcePath()))
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/labs::Lop/karma::2.0?labs::Lop/karma::2.0
Grant Miller
VFX Supervisor
Ingenuity Studios
User Avatar
Member
202 posts
Joined: Jan. 2016
Offline
Hello Grant,
I had no problem with 19.0, but now I had both the problems with 19.5


- First (the "sidefx_stroke" and "kinefx.stateutils") is fixed by adding paths as you suggested. Thank you very much for it!
- The second ('ParseExrMetadata' and 'register_pystate_embedded') persists, same as you said

But both problems can be "fixed" if I don't have the .hiplc file in a specific path (a root of Q:/ drive in my case). If I run the same .hiplc from a subfolder, I get no errors.

I am not sure if I can help to debug it further, but I can send my files and settings to SideFX, if it helps.
User Avatar
Member
16 posts
Joined: Oct. 2017
Offline
Hello, I am facing the same issue with Houdini 19.0.589 when I launch Houdini from a console if I cd in another drive than C:/.
Houdini is installed on a network and managed with Rez, and when I need to launch Houdini, I open a cmd prompt, cd in the Rez directory (R:/), acquire the rez environment, and then type "houdini", it launches, and then raises the errors you mention. If I do the same thing but before typing Houdini and launching it, I cd in the C:/ directory, everything works fine. There are no environment variables that could conflict, other than SESI_LMHOST but I don't see why this one could cause an issue like this.

# Does not work
C:\Users\donromano > cd /D R:/
R:\ > rez-env houdini-19.0.589
R:\ > houdini

# Works
C:\Users\donromano > cd /D R:/
R:\ > rez-env houdini-19.0.589
R:\ > cd C:/Users/donromano
C:\Users\donromano > houdini

I also tried with a local installation of Houdini 19.0.589 and same behavior :

# Does not work
C:\Users\donromano > cd /D R:/
R:\ > "C:\Program Files\SideFX\Houdini 19.0.589\bin\houdini"

# Works
C:\Users\donromano > "C:\Program Files\SideFX\Houdini 19.0.589\bin\houdini"
User Avatar
Member
30 posts
Joined:
Offline
Hi all,

It seems houdini doesn't like the startup directory being the root of a drive (under windows).

If i add a fresh usb drive (just to make a new drive letter) and startup from e:\, i get all the state load errors. if i make a subfolder and start from that director (e:\temp for example), i get no load errors.

time for a bug report.

cheers,
chrisg
User Avatar
Member
3 posts
Joined: Oct. 2019
Offline
For anyone who has encountered this issue, if you are starting Houdini from a shortcut which locates in the C drive, try create a shortcut by yourself for the executable in /bin folder under Houdini's install location and use this shortcut. This fixed my issue, and this issue only exists on my Windows 11 machine.
User Avatar
Member
61 posts
Joined: Oct. 2013
Offline
Amazing tip, this has been such an annoyance, thank youuu!

The Right click > Properties > Start In path is %HOMEDRIVE%%HOMEPATH% by default on our Windows install, it should be:

"C:\Program Files\Side Effects Software\Houdini 20.0.506\bin"

Attachments:
shortcutSettings.png (13.5 KB)

Grant Miller
VFX Supervisor
Ingenuity Studios
User Avatar
Member
8 posts
Joined: Jan. 2017
Offline
I am getting this same error in 20.5.332. I tried all of the suggestions for 'start in:' in the shortcut, as well as uninstalling, installing from launcher and also the 'old' way of installing. No matter what I try I get the errors below.. But in 20.5.278 I get no errors. Any help would be appreciated.





2, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/heightfield_drawmask, opdef:/Sop/heightfield_drawmask?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/heightfield_drawmask?Sop/heightfield_drawmask

Error running event handler:
Traceback (most recent call last):
File "Sop/heightfield_paint, ViewerStateModule", line 8, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/heightfield_paint, opdef:/Sop/heightfield_paint?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/heightfield_paint?Sop/heightfield_paint

Error running event handler:
Traceback (most recent call last):
File "Sop/attribpaint, ViewerStateModule", line 6, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/attribpaint, opdef:/Sop/attribpaint?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/attribpaint?Sop/attribpaint

Error running event handler:
Traceback (most recent call last):
File "Sop/drawcurve, ViewerStateModule", line 11, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/drawcurve, opdef:/Sop/drawcurve?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/drawcurve?Sop/drawcurve

Error running event handler:
Traceback (most recent call last):
File "Sop/groupbylasso, ViewerStateModule", line 5, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/groupbylasso, opdef:/Sop/groupbylasso?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/groupbylasso?Sop/groupbylasso

Error running event handler:
Traceback (most recent call last):
File "Sop/rbdpaint, ViewerStateModule", line 6, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/rbdpaint, opdef:/Sop/rbdpaint?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/rbdpaint?Sop/rbdpaint

Error running event handler:
Traceback (most recent call last):
File "Sop/shotsculpt, ViewerStateModule", line 13, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/shotsculpt, opdef:/Sop/shotsculpt?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/shotsculpt?Sop/shotsculpt

Error running event handler:
Traceback (most recent call last):
File "Sop/vellumbrush, ViewerStateModule", line 8, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/vellumbrush, opdef:/Sop/vellumbrush?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/vellumbrush?Sop/vellumbrush

Error running event handler:
Traceback (most recent call last):
File "Sop/fibergroom, ViewerStateModule", line 10, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/fibergroom, opdef:/Sop/fibergroom?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/fibergroom?Sop/fibergroom

Error running event handler:
Traceback (most recent call last):
File "Sop/frankenmusclepaint, ViewerStateModule", line 6, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "Sop/frankenmusclepaint, opdef:/Sop/frankenmusclepaint?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Sop/frankenmusclepaint?Sop/frankenmusclepaint

Error running event handler:
Traceback (most recent call last):
File "Lop/followpathconstraint, ViewerStateModule", line 11, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_curve'

Error running event handler:
Traceback (most recent call last):
File "Lop/followpathconstraint, opdef:/Lop/followpathconstraint?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/Lop/followpathconstraint?Lop/followpathconstraint

Error running event handler:
Traceback (most recent call last):
File "kinefx::Sop/adapttoterrain, ViewerStateModule", line 3, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'kinefx'

Error running event handler:
Traceback (most recent call last):
File "kinefx::Sop/adapttoterrain, opdef:/kinefx::Sop/adapttoterrain?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/kinefx::Sop/adapttoterrain?kinefx::Sop/adapttoterrain

Error running event handler:
Traceback (most recent call last):
File "labs::Lop/karma::2.0, ViewerStateModule", line 18, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'ParseExrMetadata'

Error running event handler:
Traceback (most recent call last):
File "labs::Lop/karma::2.0, opdef:/labs::Lop/karma::2.0?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/labs::Lop/karma::2.0?labs::Lop/karma::2.0

Error running event handler:
Traceback (most recent call last):
File "labs::Sop/wfc_sample_paint, ViewerStateModule", line 6, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'sidefx_stroke'

Error running event handler:
Traceback (most recent call last):
File "labs::Sop/wfc_sample_paint, opdef:/labs::Sop/wfc_sample_paint?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/labs::Sop/wfc_sample_paint?labs::Sop/wfc_sample_paint
User Avatar
Member
8 posts
Joined: Jan. 2017
Offline
Update:

Adding this line to my .env fixed 'most' of the errors. (I changed the 3.9 to 3.11


PYTHONPATH = $PYTHONPATH;$HFS/packages/kinefx/python3.11libs;$HFS/houdini/viewer_states;$HFS/packages/kinefx/viewer_states


But, I still have these errors.


Error running event handler:
Traceback (most recent call last):
File "kinefx::Sop/adapttoterrain, ViewerStateModule", line 3, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'kinefx'

Error running event handler:
Traceback (most recent call last):
File "kinefx::Sop/adapttoterrain, opdef:/kinefx::Sop/adapttoterrain?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/kinefx::Sop/adapttoterrain?kinefx::Sop/adapttoterrain

Error running event handler:
Traceback (most recent call last):
File "labs::Lop/karma::2.0, ViewerStateModule", line 18, in <module>
File "C:\Program Files\Side Effects Software\Houdini 20.5.332\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'ParseExrMetadata'

Error running event handler:
Traceback (most recent call last):
File "labs::Lop/karma::2.0, opdef:/labs::Lop/karma::2.0?ViewerStateInstall", line 1, in <module>
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.332/houdini/python3.11libs\viewerstate\utils.py", line 1007, in register_pystate_embedded
raise ViewerStateException(
viewerstate.utils.ViewerStateException: createViewerStateTemplate not found in oplib:/labs::Lop/karma::2.0?labs::Lop/karma::2.0
User Avatar
Member
3 posts
Joined: Aug. 2021
Offline
Interesting. I'm having similar Python path problems (on windows) but it was apex that my install couldn't find rather than kinefx. After updating my PYTHONPATH, it doesn't kick back any import errors on startup, but I do get the ParseExrMetadata errors when a file loads, and I get these at startup:

= = = Resources registration = = =
ERROR: sidefx_rbdconetwistconstraints cannot use handle 'configurejoints_rotation_limit_handle' because it is not a handle type.
ERROR: sidefx_rbdconetwistconstraints cannot use handle 'configurejoints_rotation_limit_handle' because it is not a handle type.

I was also doing something else in the network view a few days ago and got what was obviously a debug print statement that popped up-- it was just a python dict with some UI-related stuff in it and no error.

Labs currently won't load for me, which is really annoying because "Reset Viewport" is pretty important.

Out of curiosity, do you have the Octane plugin installed?
Edited by AndyTheBouncer - Sept. 10, 2024 17:09:23
User Avatar
Member
8 posts
Joined: Jan. 2017
Offline
Interesting... Yes, I do have Octane installed.
User Avatar
Member
3 posts
Joined: Aug. 2021
Offline
Apparently labs is installed because I have access to all of the nodes but I don't have the Labs menu or any Labs shelf tools under the Labs tab, except to start the Houdini launcher.

My guess is that either SideFX changed something that made Octane's PATH addition break their Python imports, or Otoy changed something that broke Houdini's imports. I'm digging into it a bit more. It's tough to just jump to a daily build when you've got plugins to work with. From an organizational standpoint, Otoy isn't particularly cautious about releasing breaking changes, but from a technical standpoint it seems less likely that their setup would be the culprit. The Octane plugin is working fine, though.
Edited by AndyTheBouncer - Sept. 10, 2024 22:24:48
  • Quick Links