Skip to content

'load_module()' deprecated in Python 3.12 #7880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
KumoLiu opened this issue Jun 26, 2024 · 0 comments · Fixed by #7881
Closed

'load_module()' deprecated in Python 3.12 #7880

KumoLiu opened this issue Jun 26, 2024 · 0 comments · Fixed by #7881

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Jun 26, 2024

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/yunliu/Workspace/Code/MONAI/monai/__init__.py", line 58, in <module>
    load_submodules(sys.modules[__name__], False, exclude_pattern=excludes)
  File "/home/yunliu/Workspace/Code/MONAI/monai/utils/module.py", line 212, in load_submodules
    importer.find_spec(name).loader.load_module(name)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 605, in _check_name_wrapper
  File "<frozen importlib._bootstrap_external>", line 1120, in load_module
  File "<frozen importlib._bootstrap_external>", line 945, in load_module
  File "<frozen importlib._bootstrap>", line 283, in _load_module_shim
DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead
KumoLiu added a commit to KumoLiu/MONAI that referenced this issue Jun 26, 2024
Signed-off-by: YunLiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant