OpenPype
OpenPype copied to clipboard
[QUAD] Bug: Replace ast.literal_eval with json.loads to avoid crashes on Unreal
@ccaillot in the ayon-unreal, some attributes from instance data (and these are not dict value) are also converted. Have you tried the implementation below as json.loads would error out these attributes with the non-dict type value?
instance['creator_attributes'] = json.loads(
instance.get('creator_attributes', '{}'))
instance['publish_attributes'] = json.loads(
instance.get('publish_attributes', '{}'))
instance['members'] = ast.literal_eval(
instance.get('members', '[]'))
instance['families'] = ast.literal_eval(
instance.get('families', '[]'))
instance['active'] = ast.literal_eval(
instance.get('active', ''))