File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 3030import viser .transforms as tf
3131from scipy import interpolate
3232
33+ from nerfstudio .utils .rich_utils import CONSOLE
3334from nerfstudio .viewer .control_panel import ControlPanel
3435
3536
@@ -1130,8 +1131,15 @@ def _(event: viser.GuiEvent) -> None:
11301131 }
11311132
11321133 # now write the json file
1133- json_outfile = datapath / "camera_paths" / f"{ render_name_text .value } .json"
1134- json_outfile .parent .mkdir (parents = True , exist_ok = True )
1134+ try :
1135+ json_outfile = datapath / "camera_paths" / f"{ render_name_text .value } .json"
1136+ json_outfile .parent .mkdir (parents = True , exist_ok = True )
1137+ except Exception :
1138+ CONSOLE .print (
1139+ "[bold yellow]Warning: Failed to write the camera path to the data directory. Saving to the output directory instead."
1140+ )
1141+ json_outfile = config_path .parent / "camera_paths" / f"{ render_name_text .value } .json"
1142+ json_outfile .parent .mkdir (parents = True , exist_ok = True )
11351143 with open (json_outfile .absolute (), "w" ) as outfile :
11361144 json .dump (json_data , outfile )
11371145 # now show the command
You can’t perform that action at this time.
0 commit comments