kcoley / gltf2usd

command-line utility for converting glTF 2.0 models to USD
MIT License
263 stars 39 forks source link

Enumeration Must Be String? #56

Closed enzyme69 closed 5 years ago

enzyme69 commented 5 years ago
TATATs-MacBook-Pro:gltf_example jimmyg$ python gltf2usd.py -g DamagedHelmet.gltf -o Damaged.usdz
Traceback (most recent call last):
  File "gltf2usd.py", line 1372, in <module>
    convert_to_usd(args.gltf_file, args.usd_file, args.fps, args.scale, args.arkit, args.verbose)
  File "gltf2usd.py", line 1326, in convert_to_usd
    usd = GLTF2USD(gltf_file=gltf_file, usd_file=usd_file, fps=fps, scale=scale, verbose=verbose)
  File "gltf2usd.py", line 69, in __init__
    self.convert()
  File "gltf2usd.py", line 1304, in convert
    self.convert_nodes_to_xform()
  File "gltf2usd.py", line 104, in convert_nodes_to_xform
    self._convert_node_to_xform(node, node_index, xform_name)
  File "gltf2usd.py", line 151, in _convert_node_to_xform
    self._convert_mesh_to_xform(mesh, usd_parent_node, node_index, skin_index)
  File "gltf2usd.py", line 187, in _convert_mesh_to_xform
    skin_index=skin_index)
  File "gltf2usd.py", line 222, in _convert_primitive_to_mesh
    data = self.gltf_loader.get_data(accessor=accessor)
  File "/Users/jimmyg/Downloads/gltf_example/gltf2loader.py", line 128, in get_data
    accessor_component_type = AccessorComponentType(accessor['componentType'])
  File "/Library/Python/2.7/site-packages/enum.py", line 199, in __init__
    raise EnumBadKeyError(key)
enum.EnumBadKeyError: Enumeration keys must be strings: 5126

I am using a different MacBookPro, running this Python tool to convert GLTF to USD. Trying to convert: https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/DamagedHelmet/glTF

However, keep getting the error above.

I have not installed XCode 10 or MacOS Mojave on this new MacBookPro.

enzyme69 commented 5 years ago

Ok seems to work after I install enum34 module! Phew~