getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
218 stars 49 forks source link

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

Closed BigRoy closed 4 years ago

BigRoy commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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