Cannot import file_ext error in monailabel start_server in docker #1285
Replies: 3 comments 4 replies
-
Looks like some env issue.. some of the dependent pip package (previously installed) need an upgrade. if possible start with a new env (with no previous py installed) Some links: (on endoscopy) (deepedit model is ok but many times it needs lot of training and finetuning based on the image etc..) |
Beta Was this translation helpful? Give feedback.
-
I uninstalled I'm looking into customizing it for my data and use case. Thanks for the guidance. Much appreciated. |
Beta Was this translation helpful? Give feedback.
-
Will verify one more time on the docker.. and let u know.. I am surprised to see this cyclic issue. |
Beta Was this translation helpful? Give feedback.
-
Dear All,
I am getting the following error with monailabel start_server command:
endoscopy is copied at: /opt/monai/monai/apps/endoscopy root@turing:/opt/monai/monai# monailabel start_server
app apps/endoscopy --studies datasets/endoscopy_frames --conf models tooltracking --conf epistemic_enabled true --conf epistemic_top_k 2 Using PYTHONPATH=/opt:
Traceback (most recent call last): File "/opt/monai/monai/utils/module.py", line 199, in load_submodules mod = import_module(name) File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/monai/monai/apps/endoscopy/lib/infers/init.py", line 12, in from .deepedit import DeepEdit File "/opt/monai/monai/apps/endoscopy/lib/infers/deepedit.py", line 29, in from monailabel.tasks.infer.basic_infer import BasicInferTask File "/opt/conda/lib/python3.8/site-packages/monailabel/tasks/infer/basic_infer.py", line 28, in from monailabel.transform.writer import ClassificationWriter, DetectionWriter, Writer File "/opt/conda/lib/python3.8/site-packages/monailabel/transform/writer.py", line 23, in from monailabel.utils.others.generic import file_ext ImportError: cannot import name 'file_ext' from partially initialized module 'monailabel.utils.others.generic' (most likely due to a circular import) (/opt/conda/lib/python3.8/site-packages/monailabel/utils/others/generic.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/opt/conda/lib/python3.8/site-packages/monailabel/main.py", line 25, in from monailabel.utils.others.generic import init_log_config File "/opt/conda/lib/python3.8/site-packages/monailabel/utils/others/generic.py", line 26, in from monai.apps import download_url File "/opt/monai/monai/init.py", line 55, in load_submodules(sys.modules[name], False, exclude_pattern=excludes) File "/opt/monai/monai/utils/module.py", line 209, in load_submodules raise type(e)(f"{e}\n{msg}").with_traceback(e.traceback) from e # raise with modified message File "/opt/monai/monai/utils/module.py", line 199, in load_submodules mod = import_module(name) File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/opt/monai/monai/apps/endoscopy/lib/infers/init.py", line 12, in from .deepedit import DeepEdit File "/opt/monai/monai/apps/endoscopy/lib/infers/deepedit.py", line 29, in from monailabel.tasks.infer.basic_infer import BasicInferTask File "/opt/conda/lib/python3.8/site-packages/monailabel/tasks/infer/basic_infer.py", line 28, in from monailabel.transform.writer import ClassificationWriter, DetectionWriter, Writer File "/opt/conda/lib/python3.8/site-packages/monailabel/transform/writer.py", line 23, in from monailabel.utils.others.generic import file_ext ImportError: cannot import name 'file_ext' from partially initialized module 'monailabel.utils.others.generic' (most likely due to a circular import) (/opt/conda/lib/python3.8/site-packages/monailabel/utils/others/generic.py) / /
Can someone guide me on how to get rid of this error?
Thanks in advance
Bilal
Beta Was this translation helpful? Give feedback.
All reactions