When I run (in Windows 10):
monailabel start_server --app monaibundle --studies Task09_Spleen/imagesTr --conf models renalStructures_UNEST_segmentation
I get:
Using PYTHONPATH=C:\Users\Gene\AppData\Local\Programs\Python;C:\Users\Gene\AppData\Local\Programs\Python\Python39;
“”
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: version = False
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: app = C:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monaibundle
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: studies = C:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\Task09_Spleen\imagesTr
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: verbose = INFO
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: conf = [[‘models’, ‘renalStructures_UNEST_segmentation’]]
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: host = 0.0.0.0
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: port = 8000
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: uvicorn_app = monailabel.app:app
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: ssl_keyfile = None
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: ssl_certfile = None
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: ssl_keyfile_password = None
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: ssl_ca_certs = None
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: workers = None
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: limit_concurrency = None
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: access_log = False
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: log_config = None
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: dryrun = False
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:276) - USING:: action = start_server
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_API_STR =
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_APP_DIR =
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_STUDIES =
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_AUTH_ENABLE = False
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_AUTH_DB =
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_APP_CONF = ‘{}’
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE =
[2023-03-07 10:49:47,870] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_URL =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_USERNAME =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PASSWORD =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_API_KEY =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_CACHE_PATH =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PROJECT =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_ASSET_PATH =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX = None
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX = None
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX = None
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI = True
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_SEARCH_FILTER = ‘{“Modality”: “CT”}’
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_EXPIRY = 180
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PROXY_TIMEOUT = 30.0
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_READ_TIMEOUT = 5.0
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_READ_ONLY = False
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = '[".nii.gz", “.nii", ".nrrd”, “.jpg", ".png”, “.tif", ".svs”, ".xml"]’
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = ‘[]’
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH =
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_TRACKING_ENABLED = True
[2023-03-07 10:49:47,885] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_TRACKING_URI =
[2023-03-07 10:49:47,901] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_ZOO_SOURCE = github
[2023-03-07 10:49:47,901] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_ZOO_REPO = Project-MONAI/model-zoo/hosting_storage_v1
[2023-03-07 10:49:47,901] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_ZOO_AUTH_TOKEN = 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
[2023-03-07 10:49:47,901] [15316] [MainThread] [INFO] (main:280) - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True
[2023-03-07 10:49:47,901] [15316] [MainThread] [INFO] (main:281) -
Traceback (most recent call last):
File “C:\Users\Gene\AppData\Local\Programs\python\Python39\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\Users\Gene\AppData\Local\Programs\python\Python39\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\main.py”, line 342, in
Main().run()
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\main.py”, line 133, in run
self.action_start_server(args)
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\main.py”, line 234, in action_start_server
uvicorn.run(
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\uvicorn\main.py”, line 463, in run
server.run()
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\uvicorn\server.py”, line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File “C:\Users\Gene\AppData\Local\Programs\python\Python39\lib\asyncio\runners.py”, line 44, in run
return loop.run_until_complete(main)
File “C:\Users\Gene\AppData\Local\Programs\python\Python39\lib\asyncio\base_events.py”, line 647, in run_until_complete
return future.result()
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\uvicorn\server.py”, line 67, in serve
config.load()
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\uvicorn\config.py”, line 458, in load
self.loaded_app = import_from_string(self.app)
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\uvicorn\importer.py”, line 24, in import_from_string
raise exc from None
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\uvicorn\importer.py”, line 21, in import_from_string
module = importlib.import_module(module_str)
File "C:\Users\Gene\AppData\Local\Programs\python\Python39\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in call_with_frames_removed
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\app.py”, line 23, in
from monailabel.endpoints import (
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\endpoints\activelearning.py”, line 19, in
from monailabel.interfaces.app import MONAILabelApp
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\interfaces\app.py”, line 38, in
from monailabel.datastore.dicom import DICOMwebClientX, DICOMWebDatastore
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\datastore\dicom.py”, line 26, in
from monailabel.datastore.utils.convert import binary_to_image, dicom_to_nifti, nifti_to_dicom_seg
File “c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monailabel\datastore\utils\convert.py”, line 24, in
from monai.data import nifty_writer
ImportError: cannot import name ‘nifty_writer’ from ‘monai.data’ (c:\Users\Gene\AppData\Local\Programs\Python\Python39\Lib\site-packages\monai\data_init.py)
I don’t know what to do next. I installed monailabel and then monai-weekly to avoid the hardcoded site request issue with running the server in Windows.
Gene