File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 11
11
import os
12
12
from pathlib import Path
13
13
import subprocess
14
- import yaml
15
14
from contextlib import contextmanager
16
15
import shutil
17
16
import tempfile
@@ -86,6 +85,7 @@ def maybe_extract_tar_or_zip(path):
86
85
print (f"Warning: Failed to delete temporary directory '{ temp_dir } ': { e } " )
87
86
88
87
def get_calibration (input_dir , stereo ):
88
+ import yaml
89
89
calibration = { "cameras" : [] }
90
90
91
91
def convert_distortion (model , coeffs ):
Original file line number Diff line number Diff line change @@ -19,8 +19,14 @@ def parse_args():
19
19
return parser .parse_args ()
20
20
21
21
def main ():
22
- args = parse_args ()
23
- args .func (args )
22
+ try :
23
+ args = parse_args ()
24
+ args .func (args )
25
+ except ImportError as e :
26
+ print (f"\n [ImportError] { e } " )
27
+ print ("Try installing dependencies with" )
28
+ print (" pip install spectacularAI[full]\n " )
29
+ raise
24
30
25
31
if __name__ == '__main__' :
26
32
main ()
Original file line number Diff line number Diff line change 2
2
Post-process a session and generate a smoothed trajectory with all frames
3
3
"""
4
4
import json
5
-
6
- try :
7
- from process .process import parse_input_dir , auto_config
8
- except ImportError :
9
- # hacky: The following mechanism allows using this both as a stand-alone
10
- # script and as a subcommand in sai-cli.
11
- from .process .process import parse_input_dir , auto_config
5
+ from .process .process import parse_input_dir , auto_config
12
6
13
7
def define_args (parser ):
14
8
parser .add_argument ("input" , help = "Path to folder with session to process" )
You can’t perform that action at this time.
0 commit comments