Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Install Dependencies" shelf tool #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pinkwerks
Copy link

@pinkwerks pinkwerks commented Dec 10, 2024

Using the "Install Dependencies" shelf tool fails with the error:

Traceback (most recent call last):
File "mlops_install", line 5, in
File "C:\work/MLOPs/scripts/python\mlops_utils.py", line 22, in install_mlops_dependencies
check_mlops_version()
File "C:\work/MLOPs/scripts/python\mlops_utils.py", line 288, in check_mlops_version
variables.remove("HOUDINI_PATH")
ValueError: list.remove(x): x not in list

This change updates the value searched in the package's keys. You can verify there is no values with "Environment variables" (lowercase v) present with the following script tested in houdini 20.5.410 python shell.

import json
packages = json.loads(hou.ui.packageInfo())
[print(item.keys()) for item in json.loads(hou.ui.packageInfo()).values()]

>>> [print(item.keys()) for item in json.loads(hou.ui.packageInfo()).values()]
dict_keys(['Version', 'Show', 'Locked', 'Auto load', 'Active', 'File path', 'load_package_once', 'enable', 'Environment Variables', 'Resources'])
dict_keys(['Show', 'Locked', 'Auto load', 'Active', 'File path', 'Environment Variables', 'Resources'])
dict_keys(['Show', 'Locked', 'Auto load', 'Active', 'File path', 'Environment Variables'])
dict_keys(['Show', 'Locked', 'Auto load', 'Active', 'File path', 'Environment Variables', 'Resources'])
dict_keys(['Show', 'Locked', 'Auto load', 'Active', 'File path', 'Environment Variables'])
dict_keys(['Show', 'Locked', 'Auto load', 'Active', 'File path', 'package_path', 'Environment Variables'])
dict_keys(['Show', 'Locked', 'Auto load', 'Active', 'File path', 'Environment Variables', 'Resources'])
dict_keys(['Version', 'Show', 'Locked', 'Auto load', 'Active', 'File path', 'load_package_once', 'enable', 'Environment Variables', 'Resources'])
[None, None, None, None, None, None, None, None]

Note this will lead to another error not handled by this PR referenced here #158

@pinkwerks pinkwerks marked this pull request as ready for review December 10, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant