package path is not working ?

   6037   10   1
User Avatar
Member
767 posts
Joined: April 2014
Offline
I'm having some difficulty with packages. The $HOME variable is a valid custom path but when starting Houdini I get an error that the files which Octane is seeking, specifically the shelf cannot be found. I would like to know what I'm doing wrong; should I be nesting path, within the env environment variable ?

{
"enable": true,
"env": [
{
"PATH": {
"value": "$HOME/renderEngines/Octane/bin",
"method":"append"
}
}
],
"path": {
"value": "$HOME/renderEngines/Octane"
}
}
Edited by _Christopher_ - Jan. 22, 2022 14:42:24
【T】【C】【S】
User Avatar
Staff
450 posts
Joined: Feb. 2018
Offline
Do you get any errors logged in the console ? Set HOUDINI_PACKAGE_VERBOSE=1 before launching Houdini.

The path keyword is a shortcut for HOUDINI_PATH, don't use value with keywords.

Have a look at the documentation.
Your text to link here... [www.sidefx.com]
Edited by mabelzile - Jan. 23, 2022 09:54:09
User Avatar
Member
767 posts
Joined: April 2014
Offline
mabelzile
Do you get any errors logged in the console ? Set HOUDINI_PACKAGE_VERBOSE=1 before launching Houdini.

The path keyword is a shortcut for HOUDINI_PATH, don't use value with keywords.

Have a look at the documentation.
Your text to link here... [www.sidefx.com]

There is verbose message, when I set HOUDINI_PACKAGE_VERBOSE=1 within the houdini.env file. And that message is that the preloaded icons for shelf for the plugin, cannot be determined. Therefore it cannot find the path that is the value for the path variable which represents the same as HOUDINI_PATH.

If I understand correctly, you mention not to use value with keywords but in the page you linked; there is one example where value is not used, then another example where value is used or is that only when using a method ?
Edited by _Christopher_ - Jan. 23, 2022 10:21:30
【T】【C】【S】
User Avatar
Staff
450 posts
Joined: Feb. 2018
Offline
value can be used only within the env keyword for creating env vars.

Eg
{
    "env" : 
    [
        {
            "HOUDINI_EXTERNAL_HELP_BROWSER" :
            {
                "value": "1",
                "method": "replace"
            }
        }
    ]
}


Also, don't use houdini.env to set HOUDINI_PACKAGE_VERBOSE, any env vars set in houdini.env are always processed after packages are loaded. You want to set it before running houdini:

Eg from a terminal
. export HOUDINI_PACKAGE_VERBOSE=1
. houdini
User Avatar
Member
767 posts
Joined: April 2014
Offline
There is something which I cannot understand and I've read the packages manual numerous times. I'm using the package_path variable with a condition, that condition being; if Houdini is equal to a specific version then load a packages file from a path. That is straight forward.

The issue is the path variable which is equal to houdini_path is not scanning all sub-paths or sub-paths within sub-paths for example; ../../../ for the files to which are needing to be loaded for a plugin ?

I omitted the env part of my package file but this is what I was mentioning above;
{
"package_path":
}
],
"path": "$HOME/renderEngines/Octane"
}
【T】【C】【S】
User Avatar
Staff
450 posts
Joined: Feb. 2018
Offline
Can you post your package file ?
User Avatar
Member
767 posts
Joined: April 2014
Offline
Hi, I attached my packages.json file.

Attachments:
packages.json (325 bytes)

【T】【C】【S】
User Avatar
Staff
450 posts
Joined: Feb. 2018
Offline
You got errors in your package:
1) package_path is a keyword not an env var, shouldn't appear in the "env" section
2) Package expressions are string base, you have to enclose values with single quotes. However the parser should report an error but it's not, that's a bug on my side.
3) PATH wasn't using the right syntax for appending values

Here's my corrected version (using a different expression to demo package_path since I'm running H19.5).
{
    "enable": true,
    "env": [
        {
            "PATH": {
                "value" : "$HOME/renderEngines/Octane/bin",
                "method": "append"
            }
        }
    ],
    "package_path": [{"houdini_version > '19.0.455'": "$HOME/packages/H19.0.455" }],
    "path": "$HOME/renderEngines/Octane"
}

The package under $HOME/packages/H19.0.455
{
    "enable": true,
    "env": [
        {"MYENVVAR": "/myfolder/19.0.455"}
    ]
}

Running hconfig.exe
. export HOUDINI_PACKAGE_VERBOSE=1
. hconfig -xa
= = = Houdini Package log = = =
Loading: C:/Users/marcb/houdini19.5/packages/package.json

Loading: C:/Users/marcb/DEV/HOUDINI2/dev/hfs/packages/kinefx.json

Processing: C:/Users/marcb/houdini19.5/packages/package.json

Processing: C:/Users/marcb/DEV/HOUDINI2/dev/hfs/packages/kinefx.json

Loading: C:/Users/marcb/packages/H19.0.455/mypackage.json

Processing: C:/Users/marcb/packages/H19.0.455/mypackage.json

Resolved variables:
    PATH :
        C:/Users/marcb/renderEngines/Octane/bin
        C:/PROGRA~2/WI3CF2~1/10/bin/10.0.19041.0/x64
        C:/PROGRA~2/MIB055~1/2019/PROFES~1/VC/Tools/MSVC/1429~1.301/bin/Hostx64/x64
        C:/Users/marcb/DEV/HOUDINI2/dev/hfs/bin
        C:/Program Files/Git/usr/bin
        C:/Users/marcb/bin
        C:/Program Files/Git/mingw64/bin
        C:/Program Files/Git/usr/local/bin
        C:/Program Files/Git/usr/bin
        C:/Program Files/Git/usr/bin
        C:/Program Files/Git/mingw64/bin
        C:/Program Files/Git/usr/bin
        C:/Users/marcb/bin
        C:/Python3
        C:/Python27
        C:/Python27/Scripts
        C:/WINDOWS/system32
        C:/WINDOWS
        C:/WINDOWS/System32/Wbem
        C:/WINDOWS/System32/WindowsPowerShell/v1.0
        C:/Program Files/TortoiseSVN/bin
        C:/Program Files/Ninja
        C:/Program Files/dotnet
        C:/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit
        C:/WINDOWS/system32/config/systemprofile/.dnx/bin
        C:/Program Files/Microsoft DNX/Dnvm
        C:/Program Files/Microsoft SQL Server/130/Tools/Binn
        C:/Program Files/ffmpeg/bin
        C:/WINDOWS/System32/OpenSSH
        C:/Windows/twain_32/CNQ4803
        C:/Program Files (x86)/IncrediBuild
        C:/Program Files/CMake/bin
        C:/Program Files (x86)/RBTools/bin
        C:/Python3/Scripts
        C:/Users/marcb/AppData/Local/Microsoft/WindowsApps
        C:/Users/marcb/AppData/Local/Microsoft/WindowsApps
        C:/Program Files (x86)/Diffuse
        C:/Program Files/Microsoft VS Code/bin
        C:/Users/marcb/AppData/Local/GitHubDesktop/bin
        C:/Windows/twain_32/CNQ4803
        C:/Program Files/Git/usr/bin/vendor_perl
        C:/Program Files/Git/usr/bin/core_perl
        C
        C:/PROGRA~2/MIB055~1/2019/PROFES~1/Common7/IDE
    HOUDINI_PATH :
        C:/Users/marcb/DEV/HOUDINI2/dev/hfs/packages/kinefx
        C:/Users/marcb/renderEngines/Octane
        &
    MYENVVAR : /myfolder/19.0.455

= = = = = = = = = = = = = = = =
HFS := 'C:/Users/marcb/DEV/HOUDINI2/dev/hfs'
HOME := 'C:/Users/marcb'
HOUDINI_DESKTOP_DIR := 'C:/Users/marcb/Desktop'
HOUDINI_OS := 'Windows'
HOUDINI_PACKAGE_VERBOSE := 1
HOUDINI_PATH := 'C:/Users/marcb/DEV/HOUDINI2/dev/hfs/packages/kinefx;C:/Users/marcb/renderEngines/Octane;&'
HOUDINI_TEMP_DIR := 'C:/Users/marcb/AppData/Local/Temp/houdini_temp'
HOUDINI_USER_PREF_DIR := 'C:/Users/marcb/houdini19.5'
SHELL := 'C:/PROGRA~1/Git/usr/bin/bash.exe'
USER := 'marcb'
Edited by mabelzile - Jan. 27, 2022 09:32:43
User Avatar
Member
767 posts
Joined: April 2014
Offline
Although, it still cannot find the sub-paths to the icons folder, even after doing the correction to the package.json file. This is the error I get when running hconfig -xa

Processing: C:/PROGRA~1/SIDEEF~1/HOUDIN~1.455/packages/package_dirs.json
WARNING: Package folder to process is invalid: C:/Program Files/Side Effects Software/sidefx_packages

Although the packages file should be found in the path variable, maybe it's the package_path ?
【T】【C】【S】
User Avatar
Staff
450 posts
Joined: Feb. 2018
Offline
Your C:/Program Files/Side Effects Software/sidefx_packages folder doesn't seem to exist.

Can you post the package log ?
User Avatar
Member
767 posts
Joined: April 2014
Offline
I want to know why this worked; with no errors.
{
"enable": true,
"env": [{
"PATH": {
"value": "$HOME/renderEngines/Octane/bin",
"method": "append"
}
}],
"path": "$HOME/renderEngines/Octane"
}

Although this, https://www.sidefx.com/forum/topic/82645/?page=1#post-355358 [www.sidefx.com] in the attachment is not working ?

Your C:/Program Files/Side Effects Software/sidefx_packages folder doesn't seem to exist.

Can you post the package log ?

This folder didn't exist when the above, not the packages.json file in the message attachment the other, in the beginning of this message and everything worked as mentioned without errors.
Edited by _Christopher_ - Jan. 28, 2022 09:02:38
【T】【C】【S】
  • Quick Links