Error when running MONAI Auto3DSeg (cannot import name ‘MetaKeys’ from ‘monai.utils’)

Am testing it on some abdominal CT datasets now.

am getting errors saying
ImportError: cannot import name ‘MetaKeys’ from ‘monai.utils’
‘Processing failed with return code 1’
after it attempts to create the segmentations.

What is error code 1?

The non-zero error code just means that the processing failed. The error message indicates that your MONAI package installation is corrupted (or you manually installed some very old version of MONAI).

Could you please open the Advanced section, click the Get Python package information button, and copy here the contents of the textbox?

Have you installed Anaconda on your computer? On Windows, it can overwrite lot of system settings on your computer that may break other Python environments, so if you have Anaconda installed then you may try temporarily renaming the top-level Anaconda installation folder, restart Slicer, and retry the segmentation.

1 Like

here it is. I dont have anaconda installed.

Name: monai

Version: 0.9.0

Summary: AI Toolkit for Healthcare Imaging


Author: MONAI Consortium


License: Apache License 2.0

Location: c:\users\XXX\appdata\local\\slicer 5.6.1\lib\python\lib\site-packages

Requires: numpy, torch


1 Like

Hi @davidngqk88,

This is strange.
I’d suggest you download the latest Preview Slicer and do a clean installation of the MONAI Auto3DSeg extension.

Please let us know,

Yes, MONAI Auto3DSeg is only supported with the latest Slicer Stable Release and latest Slicer Preview Release. Your Slicer version is 5.6.1 (the current stable is 5.6.2), so your Slicer has not been receiving any of the extension updates for a good while and your MONAI Auto3DSeg extension is an early prototype version.

1 Like