pythonblenderpanda3d

FileNotFoundError with blend2bam


So I tried converting a .blend file to .bam with blend2bam as suggested by the official Panda3D page but I am getting a FileNotFoundError. I am using Windows with Python3.7 (from the Panda3D install). I tried a lot of possibilities of how one could address the src and dst but it still did not work.

C:\Panda3D-1.10.6-x64\mystuff\pandatest>blend2bam C:\Panda3D-1.10.6-x64\mystuff\pandatest\car_model.blend C:\Panda3D-1.10.6-x64\mystuff\pandatest\
Traceback (most recent call last):
  File "c:\panda3d-1.10.6-x64\python\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\panda3d-1.10.6-x64\python\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Panda3D-1.10.6-x64\python\Scripts\blend2bam.exe\__main__.py", line 9, in <module>
  File "c:\panda3d-1.10.6-x64\python\lib\site-packages\blend2bam\cli.py", line 195, in main
    use_gltf28 = blenderutils.is_blender_28(args.blender_dir)
  File "c:\panda3d-1.10.6-x64\python\lib\site-packages\blend2bam\blenderutils.py", line 22, in is_blender_28
    output = subprocess.check_output([binpath, '--version'])
  File "c:\panda3d-1.10.6-x64\python\lib\subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "c:\panda3d-1.10.6-x64\python\lib\subprocess.py", line 488, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:\panda3d-1.10.6-x64\python\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "c:\panda3d-1.10.6-x64\python\lib\subprocess.py", line 1207, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

Solution

  • Ran into same error. It calls blender so needs to know where to find it: blend2bam --blender-dir "C:\Program Files\Blender Foundation\Blender 2.82" test.blend test_bam_dir