File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,11 @@ pub async fn make_string_engine(
7777) -> pipeline_error:: Result < OpenAIChatCompletionsStreamingEngine > {
7878 pyo3:: prepare_freethreaded_python ( ) ;
7979 if let Ok ( venv) = env:: var ( "VIRTUAL_ENV" ) {
80- Python :: with_gil ( |py| super :: fix_venv ( venv, py) ) ;
80+ Python :: with_gil ( |py| {
81+ if let Err ( e) = super :: fix_venv ( venv, py) {
82+ tracing:: warn!( "failed to fix venv: {}" , e) ;
83+ }
84+ } ) ;
8185 }
8286
8387 let engine = new_engine ( cancel_token, py_file, py_args) . await ?;
@@ -93,7 +97,11 @@ pub async fn make_token_engine(
9397) -> pipeline_error:: Result < ExecutionContext > {
9498 pyo3:: prepare_freethreaded_python ( ) ;
9599 if let Ok ( venv) = env:: var ( "VIRTUAL_ENV" ) {
96- Python :: with_gil ( |py| super :: fix_venv ( venv, py) ) ;
100+ Python :: with_gil ( |py| {
101+ if let Err ( e) = super :: fix_venv ( venv, py) {
102+ tracing:: warn!( "failed to fix venv: {}" , e) ;
103+ }
104+ } ) ;
97105 }
98106
99107 let engine = new_engine ( cancel_token, py_file, py_args) . await ?;
You can’t perform that action at this time.
0 commit comments