I’m encountering this problem “OSError: Could not load Actor model Character/daz.gltf” when I run my model in pycharm IDE. The used character is exported from blender as .gltf and located in a folder inside the pycharm project folder.
I don’t know the reason behind this error. I tried to use the complete path to the character, but unfortunately this doesn’t work, also I tried to put the character in the pandas3d’s models folder but this doesn’t work also.
could you please help me?!
(this the code I used):
from direct.actor.Actor import Actor
from direct.showbase.ShowBase import ShowBase
Hi Simulan, thanks for your time and support.
I run your code and I put the daz.gltf file in the project directory, but it gives me this error:
OSError: Could not load model file(s): [‘daz.gltf’]
is that error related to a file damage during the conversion in blender? or something else?
It does seem like a path issue. You should ensure that your PyCharm environment is properly set up, or better yet run your program from the terminal/CLI at your program directory.
Perhaps somebody else here has an idea what may be the problem.
That error could indeed indicate that there is a problem with the model file itself.
But to know for certain, it would be helpful if you could show us the complete traceback related to the error.
If it contains the following:
RuntimeError: Failed to convert glTF file
:loader(error): Loading daz.gltf failed with RuntimeError exception.
then there could effectively have been a problem when exporting from Blender, as you suggested.
As to what could have gone wrong exactly, I cannot say, however.