Skip to content

Fix loader in Houdini 18 as it returns 'long' instead of 'int'#479

Merged
BigRoy merged 1 commit into
getavalon:masterfrom
BigRoy:fix_hou18_loader
Dec 9, 2019
Merged

Fix loader in Houdini 18 as it returns 'long' instead of 'int'#479
BigRoy merged 1 commit into
getavalon:masterfrom
BigRoy:fix_hou18_loader

Conversation

@BigRoy
Copy link
Copy Markdown
Collaborator

@BigRoy BigRoy commented Dec 2, 2019

What's changed?

It seems somehow the returned version number is not an int in Houdini 18 but a long. As such, the assertion in the VersionDelegate would catch it incorrectly.

This is now resolved by checking it against numbers.Integral to ensure it's also Python 3+ proof where long no longer exists.

@iLLiCiTiT
Copy link
Copy Markdown
Contributor

iLLiCiTiT commented Dec 2, 2019

Hi, we solved this issue few day ago with try except under import part. Like:

try:
    long
except NameError:
    long = int

and in displayText we add this check:

isinstance(value, long):
    value = int(value)

@BigRoy
Copy link
Copy Markdown
Collaborator Author

BigRoy commented Dec 2, 2019

Seems like a similar fix. I'll merge this in a few days if there are no objections.

@BigRoy BigRoy merged commit bf38ee7 into getavalon:master Dec 9, 2019
@BigRoy BigRoy deleted the fix_hou18_loader branch January 25, 2021 14:53
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.

2 participants