question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[8263] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.

See original GitHub issue

Describe the bug HTTP Error 404 : Not Found raised by the urllib when trying to download the swin_unetr_btcv_segmentation_v0.1.0 model bundle with the monaibundle app as presented in the Quickstart Tutorial 2 - Bundle App Tutorial and Use Cases.

To Reproduce Follow the Quickstart Tutorial 2 - Use Case 1 (https://docs.monai.io/projects/label/en/latest/quickstart.html#tutorial-2-bundle-app-tutorial-and-use-cases) with the attached conda environnement on a Linux system

Expected behavior Expected the server to run locally

Environment

Ensuring you use the relevant python executable, please paste the output of:

python -c 'import monai; monai.config.print_debug_info()'

================================ Printing MONAI config…

MONAI version: 0.9.1 Numpy version: 1.23.2 Pytorch version: 1.12.1 MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False MONAI rev id: 356d2d2f41b473f588899d705bbc682308cee52c MONAI file: /home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monai/init.py

Optional dependencies: Pytorch Ignite version: 0.4.9 Nibabel version: 4.0.2 scikit-image version: 0.19.3 Pillow version: 9.2.0 Tensorboard version: 2.10.0 gdown version: 4.5.1 TorchVision version: 0.13.1+cu102 tqdm version: 4.64.1 lmdb version: 1.3.0 psutil version: 5.9.2 pandas version: NOT INSTALLED or UNKNOWN VERSION. einops version: 0.4.1 transformers version: NOT INSTALLED or UNKNOWN VERSION. mlflow version: NOT INSTALLED or UNKNOWN VERSION. pynrrd version: 0.4.3

For details about installing the optional dependencies, please visit: https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies

================================ Printing system config…

System: Linux Linux version: Ubuntu 18.04.6 LTS Platform: Linux-4.15.0-159-generic-x86_64-with-glibc2.27 Processor: x86_64 Machine: x86_64 Python version: 3.9.13 Process name: python Command: [‘python’, ‘-c’, ‘import monai; monai.config.print_debug_info()’] Open files: [] Num physical CPUs: 20 Num logical CPUs: 40 Num usable CPUs: 40 CPU usage (%): [11.2, 9.0, 9.0, 9.8, 40.6, 9.7, 10.4, 9.0, 9.0, 9.0, 9.8, 9.0, 9.0, 8.3, 9.0, 9.6, 9.0, 9.1, 9.7, 8.3, 9.0, 9.0, 9.0, 9.7, 11.1, 9.0, 9.7, 9.7, 9.0, 67.2, 9.8, 9.7, 9.7, 9.0, 10.7, 11.9, 9.8, 9.7, 9.0, 9.6] CPU freq. (MHz): 1271 Load avg. in last 1, 5, 15 mins (%): [0.9, 0.9, 0.9] Disk usage (%): 66.3 Avg. sensor temp. (Celsius): UNKNOWN for given OS Total physical memory (GB): 251.8 Available memory (GB): 202.4 Used memory (GB): 45.5

================================ Printing GPU config…

Num GPUs: 4 Has CUDA: True CUDA version: 11.3 cuDNN enabled: True cuDNN version: 8302 Current device: 0 Library compiled for CUDA architectures: [‘sm_37’, ‘sm_50’, ‘sm_60’, ‘sm_61’, ‘sm_70’, ‘sm_75’, ‘sm_80’, ‘sm_86’, ‘compute_37’] GPU 0 Name: Tesla V100-DGXS-32GB GPU 0 Is integrated: False GPU 0 Is multi GPU board: False GPU 0 Multi processor count: 80 GPU 0 Total memory (GB): 31.7 GPU 0 CUDA capability (maj.min): 7.0 GPU 1 Name: Tesla V100-DGXS-32GB GPU 1 Is integrated: False GPU 1 Is multi GPU board: False GPU 1 Multi processor count: 80 GPU 1 Total memory (GB): 31.7 GPU 1 CUDA capability (maj.min): 7.0 GPU 2 Name: Tesla V100-DGXS-32GB GPU 2 Is integrated: False GPU 2 Is multi GPU board: False GPU 2 Multi processor count: 80 GPU 2 Total memory (GB): 31.7 GPU 2 CUDA capability (maj.min): 7.0 GPU 3 Name: Tesla V100-DGXS-32GB GPU 3 Is integrated: False GPU 3 Is multi GPU board: False GPU 3 Multi processor count: 80 GPU 3 Total memory (GB): 31.7 GPU 3 CUDA capability (maj.min): 7.0

Additional context The following is the output of the command monailabel start_server -a <path to monaibundle app> -s <path to Task09_Spleen/imagesTr> --conf models swin_unetr_btcv_segmentation_v0.1.0 : Using PYTHONPATH=/home/rocremes/mambaforge/envs: [2022-09-19 14:01:55,861] [11037] [MainThread] [INFO] (main:269) - USING:: app = /home/rocremes/projects/monai-label/apps/monaibundle [2022-09-19 14:01:55,861] [11037] [MainThread] [INFO] (main:269) - USING:: studies = /mnt/hecatonchire/PIPELINE/datas/Task09_Spleen/imagesTr [2022-09-19 14:01:55,861] [11037] [MainThread] [INFO] (main:269) - USING:: verbose = INFO [2022-09-19 14:01:55,861] [11037] [MainThread] [INFO] (main:269) - USING:: conf = [[‘models’, ‘swin_unetr_btcv_segmentation_v0.1.0’]] [2022-09-19 14:01:55,861] [11037] [MainThread] [INFO] (main:269) - USING:: host = 0.0.0.0 [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: port = 8000 [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: uvicorn_app = monailabel.app:app [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: ssl_keyfile = None [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: ssl_certfile = None [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: ssl_keyfile_password = None [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: ssl_ca_certs = None [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: workers = None [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: limit_concurrency = None [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: access_log = False [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: log_config = None [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: dryrun = False [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:269) - USING:: action = start_server [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_API_STR = [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_APP_DIR = [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_STUDIES = [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_AUTH_ENABLE = False [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_AUTH_DB = [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_APP_CONF = ‘{}’ [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE = [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_USERNAME = [2022-09-19 14:01:55,862] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PASSWORD = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_API_KEY = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_CACHE_PATH = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PROJECT = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_ASSET_PATH = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = ‘[“.nii.gz", ".nii”, “.nrrd", ".jpg”, “.png", ".tif”, “.svs", ".xml”]’ [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000 [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = ‘[]’ [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH = [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600 [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1 [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600 [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:273) - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True [2022-09-19 14:01:55,863] [11037] [MainThread] [INFO] (main:274) - Allow Origins: [‘*’] [2022-09-19 14:01:56,310] [11037] [MainThread] [INFO] (uvicorn.error:75) - Started server process [11037] [2022-09-19 14:01:56,310] [11037] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup. [2022-09-19 14:01:56,310] [11037] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: /home/rocremes/projects/monai-label/apps/monaibundle; studies: /mnt/hecatonchire/PIPELINE/datas/Task09_Spleen/imagesTr; conf: {‘models’: ‘swin_unetr_btcv_segmentation_v0.1.0’} [2022-09-19 14:01:56,312] [11037] [MainThread] [INFO] (monailabel.utils.others.class_utils:36) - Subclass for MONAILabelApp Found: <class ‘main.MyApp’> [2022-09-19 14:01:56,542] [11037] [MainThread] [INFO] (main:78) - +++ Adding Model: swin_unetr_btcv_segmentation_v0.1.0 => {‘checksum’: ‘65eaf535f04e80c8d82c597449a60ef8c1622692’, ‘source’: ‘https://github.com/Project-MONAI/model-zoo/releases/download/hosting_storage_v1/swin_unetr_btcv_segmentation_v0.1.0.zip’} => /home/rocremes/projects/monai-label/apps/monaibundle/model/swin_unetr_btcv_segmentation_v0.1.0 2022-09-19 14:01:56,543 - INFO - — input summary of monai.bundle.scripts.download — 2022-09-19 14:01:56,543 - INFO - > name: ‘swin_unetr_btcv_segmentation_v0.1.0’ 2022-09-19 14:01:56,543 - INFO - > bundle_dir: ‘/home/rocremes/projects/monai-label/apps/monaibundle/model’ 2022-09-19 14:01:56,543 - INFO - > source: ‘github’ 2022-09-19 14:01:56,543 - INFO - > repo: ‘Project-MONAI/model-zoo/ll’ 2022-09-19 14:01:56,543 - INFO - > progress: True 2022-09-19 14:01:56,543 - INFO - —

swin_unetr_btcv_segmentation_v0.1.0.zip: 0.00B [00:00, ?B/s] 2022-09-19 14:01:56,790 - ERROR - Download failed from https://github.com/Project-MONAI/model-zoo/releases/download/ll/swin_unetr_btcv_segmentation_v0.1.0.zip to /tmp/tmp7ik_1nmn/swin_unetr_btcv_segmentation_v0.1.0.zip. [2022-09-19 14:01:56,793] [11037] [MainThread] [ERROR] (uvicorn.error:119) - Traceback (most recent call last): File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/starlette/routing.py”, line 635, in lifespan async with self.lifespan_context(app): File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/starlette/routing.py”, line 530, in aenter await self.router.startup() File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/starlette/routing.py”, line 612, in startup await handler() File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monailabel/app.py”, line 104, in startup_event instance = app_instance() File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monailabel/interfaces/utils/app.py”, line 51, in app_instance app = c(app_dir=app_dir, studies=studies, conf=conf) File “/home/rocremes/projects/monai-label/apps/monaibundle/main.py”, line 80, in init download(name=k, bundle_dir=self.model_dir, source=zoo_source, repo=zoo_repo) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monai/bundle/scripts.py”, line 223, in download download_from_github(repo=repo, download_path=bundle_dir, filename=name_, progress=progress_) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monai/bundle/scripts.py”, line 140, in _download_from_github download_url(url=url, filepath=filepath, hash_val=None, progress=progress) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monai/apps/utils.py”, line 203, in download_url _download_with_progress(url, tmp_name, progress=progress) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monai/apps/utils.py”, line 114, in _download_with_progress raise e File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/site-packages/monai/apps/utils.py”, line 107, in _download_with_progress urlretrieve(url, filepath, reporthook=t.update_to) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/urllib/request.py”, line 239, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/urllib/request.py”, line 214, in urlopen return opener.open(url, data, timeout) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/urllib/request.py”, line 523, in open response = meth(req, response) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/urllib/request.py”, line 632, in http_response response = self.parent.error( File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/urllib/request.py”, line 561, in error return self._call_chain(*args) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/urllib/request.py”, line 494, in _call_chain result = func(*args) File “/home/rocremes/mambaforge/envs/mlabel-env/lib/python3.9/urllib/request.py”, line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found

[2022-09-19 14:01:56,793] [11037] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.

mlabel_env.txt

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
rcremesecommented, Sep 19, 2022

I will try to give you feedback ! I’m super excited to try it out. By the way, thank you for the great work

1reaction
tangy5commented, Sep 19, 2022

Ok, I see, I just realised how dumb I am sweat I probly changed this variable when looking at the main.py file and didn’t even realised ! Sorry for bothering you. Everything works fine now !

No problem, thank you for using MONAI label and the bundle app, the Bundle App is a new feature added recently. Let us know if you have any questions or feedback. It’s an open project, and we’d appreciated all suggestions and user experience comment!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[MainThread] [ERROR] (uvicorn.error:56) - Application startup ...
error:56 ) - Application startup failed. Exiting. When going into MONAILabel and running your suggested command I ...
Read more >
python - Uvicorn log the errror message instead of INFO ...
The reason you can't find the error is that it's not an error, it is the name of the logger (set in uvicorn/main.py...
Read more >
Issue while starting the MONAILabel server - Support
Problem report for Slicer 5.0.3 win-amd64: [please describe ... [MainThread] [INFO] (uvicorn.error:59) - Application startup complete.
Read more >
tiangolo/fastapi - Gitter
Hello guys, trying to deploy a gunicorn/uvicorn/fastapi application, I'm a bit struggling to ... INFO:uvicorn.error:Waiting for application startup.
Read more >
"Permission Denied" when trying to deploy FastAPI app using ...
Hello, I have been trying to deploy a FastAPI app to Render using uvicorn but I'm constantly running into errors. When I first...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found