diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-31 16:56:37 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-31 16:56:37 +0000 |
commit | 05933840f0676dd1a90a7e2ad3f2a0672624b2cd (patch) | |
tree | 593940d16fdc678c275b2b2f21ac6df7c6aad959 /modules/api/api.py | |
parent | d67ef01f629d2034fb847dae6aa0143c87161b8f (diff) | |
download | stable-diffusion-webui-gfx803-05933840f0676dd1a90a7e2ad3f2a0672624b2cd.tar.gz stable-diffusion-webui-gfx803-05933840f0676dd1a90a7e2ad3f2a0672624b2cd.tar.bz2 stable-diffusion-webui-gfx803-05933840f0676dd1a90a7e2ad3f2a0672624b2cd.zip |
rename print_error to report, use it with together with package name
Diffstat (limited to 'modules/api/api.py')
-rw-r--r-- | modules/api/api.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/api/api.py b/modules/api/api.py index fbd616a3..d34ab422 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -14,9 +14,8 @@ from fastapi.encoders import jsonable_encoder from secrets import compare_digest import modules.shared as shared -from modules import sd_samplers, deepbooru, sd_hijack, images, scripts, ui, postprocessing +from modules import sd_samplers, deepbooru, sd_hijack, images, scripts, ui, postprocessing, errors from modules.api import models -from modules.errors import print_error from modules.shared import opts from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img, process_images from modules.textual_inversion.textual_inversion import create_embedding, train_embedding @@ -145,7 +144,7 @@ def api_middleware(app: FastAPI): print(message) console.print_exception(show_locals=True, max_frames=2, extra_lines=1, suppress=[anyio, starlette], word_wrap=False, width=min([console.width, 200])) else: - print_error(message, exc_info=True) + errors.report(message, exc_info=True) return JSONResponse(status_code=vars(e).get('status_code', 500), content=jsonable_encoder(err)) @app.middleware("http") |