Hi everyone! For some reason my .gltf file couldn’t load even though I installed panda3d-gltf
here is the full traceback:
Known pipe types:
CocoaGraphicsPipe
(all display modules loaded.)
2019-12-08 19:38:24.994 Python[12664:338229] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 1243, in load_model
convert(file_path, bamfilepath, gltf_settings)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 1228, in convert
converter.update(gltf_data, writing_bam=True)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 123, in update
self.load_buffer(buffid, gltf_buffer)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 376, in load_buffer
with open(buff_fname, 'rb') as buff_file:
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/direct/stdpy/file.py", line 99, in open
raise FileNotFoundError("No such file or directory: '%s'" % (filename))
FileNotFoundError: No such file or directory: '/Developer/Panda3D/models/scene.bin'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/loader.py", line 21, in load_file
options=options
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 1249, in load_model
raise RuntimeError("Failed to convert glTF file")
RuntimeError: Failed to convert glTF file
:loader(error): Loading scene.gltf failed with RuntimeError exception.
:loader(error): Couldn't load file /Developer/Panda3D/models/scene.gltf: invalid.
Traceback (most recent call last):
File "/Users/38167/PycharmProjects/viren/scene.py", line 162, in <module>
app = MyApp()
File "/Users/38167/PycharmProjects/viren/scene.py", line 71, in __init__
self.plant = Actor("/Developer/Panda3D/models/scene.gltf")
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/direct/actor/Actor.py", line 290, in __init__
self.loadModel(models, copy = copy, okMissing = okMissing)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/direct/actor/Actor.py", line 1900, in loadModel
raise IOError("Could not load Actor model %s" % (modelPath))
OSError: Could not load Actor model /Developer/Panda3D/models/scene.gltf
No such file or directory: ‘/Developer/Panda3D/models/scene.bin’
The scene.gltf file references a scene.bin file, which should have come with the model, but you have not copied it to the models folder alongside the scene.gltf file.
Ok so I dragged the scene.bin file and it still didn’t work, I then tried also dragging the textures folder and that also did not work. What should I do?
Known pipe types:
CocoaGraphicsPipe
(all display modules loaded.)
2019-12-08 20:48:32.412 Python[13236:353176] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
:gobj(error): GeomTriangles references vertices up to 61, but GeomVertexData has only 50 rows!
Assertion failed: primitive->check_valid(cdata->_data.get_read_pointer(current_thread)) at line 364 of panda/src/gobj/geom.cxx
Traceback (most recent call last):
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 1243, in load_model
convert(file_path, bamfilepath, gltf_settings)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 1228, in convert
converter.update(gltf_data, writing_bam=True)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 149, in update
self.load_mesh(meshid, gltf_mesh, gltf_data)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 976, in load_mesh
self.load_primitive(node, gltf_primitive, gltf_data)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 963, in load_primitive
geom.add_primitive(prim)
AssertionError: primitive->check_valid(cdata->_data.get_read_pointer(current_thread)) at line 364 of panda/src/gobj/geom.cxx
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/loader.py", line 21, in load_file
options=options
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/gltf/converter.py", line 1249, in load_model
raise RuntimeError("Failed to convert glTF file")
RuntimeError: Failed to convert glTF file
:loader(error): Loading scene.gltf failed with RuntimeError exception.
:loader(error): Couldn't load file /Developer/Panda3D/models/scene.gltf: invalid.
Traceback (most recent call last):
File "/Users/38167/PycharmProjects/viren/scene.py", line 163, in <module>
app = MyApp()
File "/Users/38167/PycharmProjects/viren/scene.py", line 72, in __init__
self.plant = Actor("/Developer/Panda3D/models/scene.gltf")
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/direct/actor/Actor.py", line 290, in __init__
self.loadModel(models, copy = copy, okMissing = okMissing)
File "/Users/38167/PycharmProjects/viren/venv/lib/python3.7/site-packages/direct/actor/Actor.py", line 1900, in loadModel
raise IOError("Could not load Actor model %s" % (modelPath))
OSError: Could not load Actor model /Developer/Panda3D/models/scene.gltf
Process finished with exit code 1
Are you sure it’s not something with the code or installation? Not trying to sound like a know it all or something, I’m just curious as I myself might be the problem and not the package.