aletrn commited on
Commit
91c9cb3
·
1 Parent(s): 4ae97e4

[debug] show more details in case of exceptions

Browse files
Files changed (1) hide show
  1. wrappers/fastapi_wrapper.py +1 -1
wrappers/fastapi_wrapper.py CHANGED
@@ -87,7 +87,7 @@ def infer_samgis(request_input: ApiRequestBody) -> JSONResponse:
87
  except Exception as inference_exception:
88
  import subprocess
89
  home_content = subprocess.run(
90
- "ls -l /var/task", shell=True, universal_newlines=True, stdout=subprocess.PIPE
91
  )
92
  app_logger.error(f"/home/user ls -l: {home_content.stdout}.")
93
  app_logger.error(f"inference error:{inference_exception}.")
 
87
  except Exception as inference_exception:
88
  import subprocess
89
  home_content = subprocess.run(
90
+ "ls -l {PROJECT_ROOT_FOLDER} {PROJECT_ROOT_FOLDER}/*", shell=True, universal_newlines=True, stdout=subprocess.PIPE
91
  )
92
  app_logger.error(f"/home/user ls -l: {home_content.stdout}.")
93
  app_logger.error(f"inference error:{inference_exception}.")