Hi! I hope someone could help me with my problem. I successfully installed Monailabel on my home (Mac)computer, started the server, and it works inside 3D Slicer. I followed same steps to install it on my work Windows computer - which is more powerful - but I cannot seem to start the server.
Can anyone please look at the output bellow and suggest a solution?
(monailabel-env) C:\Users\EchoPac>monailabel start_server --app apps/radiology --studies datasets/Task02_Heart/ImagesTr --conf models deepedit
Using PYTHONPATH=C:\Users\EchoPac.conda\envs;
“”
2023-01-20 17:48:12,913 - USING:: version = False
2023-01-20 17:48:12,913 - USING:: app = C:\Users\EchoPac\apps\radiology
2023-01-20 17:48:12,913 - USING:: studies = C:\Users\EchoPac\datasets\Task02_Heart\imagesTr
2023-01-20 17:48:12,913 - USING:: verbose = INFO
2023-01-20 17:48:12,913 - USING:: conf = [[‘models’, ‘deepedit’]]
2023-01-20 17:48:12,913 - USING:: host = 0.0.0.0
2023-01-20 17:48:12,913 - USING:: port = 8000
2023-01-20 17:48:12,913 - USING:: uvicorn_app = monailabel.app:app
2023-01-20 17:48:12,913 - USING:: ssl_keyfile = None
2023-01-20 17:48:12,913 - USING:: ssl_certfile = None
2023-01-20 17:48:12,913 - USING:: ssl_keyfile_password = None
2023-01-20 17:48:12,913 - USING:: ssl_ca_certs = None
2023-01-20 17:48:12,913 - USING:: workers = None
2023-01-20 17:48:12,913 - USING:: limit_concurrency = None
2023-01-20 17:48:12,913 - USING:: access_log = False
2023-01-20 17:48:12,913 - USING:: log_config = None
2023-01-20 17:48:12,913 - USING:: dryrun = False
2023-01-20 17:48:12,913 - USING:: action = start_server
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_API_STR =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_APP_DIR =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_STUDIES =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_AUTH_ENABLE = False
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_AUTH_DB =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_APP_CONF = ‘{}’
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_URL =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_USERNAME =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PASSWORD =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_API_KEY =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_CACHE_PATH =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PROJECT =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_ASSET_PATH =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX = None
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX = None
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX = None
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_SEARCH_FILTER = ‘{“Modality”: “CT”}’
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_EXPIRY = 180
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PROXY_TIMEOUT = 30.0
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_READ_TIMEOUT = 5.0
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_READ_ONLY = False
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = ‘[“.nii.gz", ".nii”, “.nrrd", ".jpg”, “.png", ".tif”, “.svs", ".xml”]’
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = ‘’
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_TRACKING_ENABLED = True
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_TRACKING_URI =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_ZOO_SOURCE = github
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_ZOO_REPO = Project-MONAI/model-zoo/hosting_storage_v1
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_ZOO_AUTH_TOKEN =
2023-01-20 17:48:12,913 - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True
2023-01-20 17:48:12,913 -
Allow Origins: [‘*’]
[2023-01-20 17:48:14,147] [11612] [MainThread] [INFO] (uvicorn.error:75) - Started server process [11612]
[2023-01-20 17:48:14,147] [11612] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup.
[2023-01-20 17:48:14,147] [11612] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: C:\Users\EchoPac\apps\radiology; studies: C:\Users\EchoPac\datasets\Task02_Heart\imagesTr; conf: {‘models’: ‘deepedit’}
[2023-01-20 17:48:14,584] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for MONAILabelApp Found: <class ‘main.MyApp’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.deepedit.DeepEdit’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.deepgrow_2d.Deepgrow2D’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.deepgrow_3d.Deepgrow3D’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.localization_spine.LocalizationSpine’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.localization_vertebra.LocalizationVertebra’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.segmentation.Segmentation’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.segmentation_spleen.SegmentationSpleen’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class ‘lib.configs.segmentation_vertebra.SegmentationVertebra’>
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (main:93) - +++ Adding Model: deepedit => lib.configs.deepedit.DeepEdit
[2023-01-20 17:48:14,600] [11612] [MainThread] [INFO] (monailabel.utils.others.generic:185) - Downloading resource: C:\Users\EchoPac\apps\radiology\model\pretrained_deepedit_dynunet.pt from https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology_deepedit_dynunet_multilabel.pt
pretrained_deepedit_dynunet.pt: 0.00B [00:00, ?B/s]
2023-01-20 17:48:14,727 - ERROR - Download failed from https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology_deepedit_dynunet_multilabel.pt to C:\Users\EchoPac\AppData\Local\Temp\tmp6fkuh0c8\pretrained_deepedit_dynunet.pt.
[2023-01-20 17:48:14,806] [11612] [MainThread] [ERROR] (uvicorn.error:119) - Traceback (most recent call last):
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 1346, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1040, in _send_output
self.send(msg)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 980, in send
self.connect()
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\http\client.py”, line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\ssl.py”, line 501, in wrap_socket
return self.sslsocket_class._create(
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\ssl.py”, line 1041, in _create
self.do_handshake()
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\ssl.py”, line 1310, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\starlette\routing.py”, line 635, in lifespan
async with self.lifespan_context(app):
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\starlette\routing.py”, line 530, in aenter
await self._router.startup()
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\starlette\routing.py”, line 612, in startup
await handler()
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monailabel\app.py”, line 106, in startup_event
instance = app_instance()
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monailabel\interfaces\utils\app.py”, line 51, in app_instance
app = c(app_dir=app_dir, studies=studies, conf=conf)
File “C:\Users\EchoPac\apps\radiology\main.py”, line 95, in init
self.models[k].init(k, self.model_dir, conf, self.planner)
File “C:\Users\EchoPac\apps\radiology\lib\configs\deepedit.py”, line 74, in init
download_file(url, self.path[0])
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monailabel\utils\others\generic.py”, line 187, in download_file
download_url(url, path)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monai\apps\utils.py”, line 203, in download_url
_download_with_progress(url, tmp_name, progress=progress)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monai\apps\utils.py”, line 114, in _download_with_progress
raise e
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\site-packages\monai\apps\utils.py”, line 107, in _download_with_progress
urlretrieve(url, filepath, reporthook=t.update_to)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 239, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 214, in urlopen
return opener.open(url, data, timeout)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 517, in open
response = self._open(req, data)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 494, in _call_chain
result = func(*args)
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File “C:\Users\EchoPac.conda\envs\monailabel-env\lib\urllib\request.py”, line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>
[2023-01-20 17:48:14,806] [11612] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.