Skip to content

'load_module()' deprecated in Python 3.12 #7880

Closed

Description

@KumoLiu
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

Activity

  1. added a commit that references this issue on Jun 26, 2024
    7e2c06a
  2. added a commit that references this issue on Jun 27, 2024
    586c659
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions