saltstack / salt-ext-modules-vmware

Salt Extension Modules for VMware
Apache License 2.0
20 stars 36 forks source link

AttributeError: 'EntryPoints' object has no attribute 'items' #339

Closed KnutssonDevelopment closed 3 months ago

KnutssonDevelopment commented 1 year ago

I am trying to setup a dev environment but I do not really understand the install instructions. I think I did all the necessary stuff, but it does not explain how to actually start the master and minion.

I tried to start the minion like this: salt-minion -c local/etc/salt

That gives a lot of errors:

[ERROR   ] 'EntryPoints' object has no attribute 'items'
Traceback (most recent call last):
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/parsers.py", line 212, in parse_args
    mixin_after_parsed_func(self)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/parsers.py", line 905, in __setup_logging
    salt._logging.setup_logging()
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/_logging/impl.py", line 971, in setup_logging
    setup_extended_logging(opts)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/_logging/impl.py", line 878, in setup_extended_logging
    providers = salt.loader.log_handlers(opts)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/loader/__init__.py", line 857, in log_handlers
    _module_dirs(
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/loader/__init__.py", line 153, in _module_dirs
    for entry_point in entrypoints.iter_entry_points("salt.loader"):
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/entrypoints.py", line 29, in _wrapped
    return f(*args, **kwargs)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/entrypoints.py", line 41, in iter_entry_points
    for entry_point_group, entry_points_list in entry_points.items():
AttributeError: 'EntryPoints' object has no attribute 'items'
Usage: salt-minion [options]

[ERROR   ] 'EntryPoints' object has no attribute 'items'
Traceback (most recent call last):
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/parsers.py", line 212, in parse_args
    mixin_after_parsed_func(self)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/parsers.py", line 905, in __setup_logging
    salt._logging.setup_logging()
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/_logging/impl.py", line 971, in setup_logging
    setup_extended_logging(opts)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/_logging/impl.py", line 878, in setup_extended_logging
    providers = salt.loader.log_handlers(opts)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/loader/__init__.py", line 857, in log_handlers
    _module_dirs(
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/loader/__init__.py", line 153, in _module_dirs
    for entry_point in entrypoints.iter_entry_points("salt.loader"):
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/entrypoints.py", line 29, in _wrapped
    return f(*args, **kwargs)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/entrypoints.py", line 41, in iter_entry_points
    for entry_point_group, entry_points_list in entry_points.items():
AttributeError: 'EntryPoints' object has no attribute 'items'
salt-minion: error: Error while processing <function LogLevelMixIn.__setup_logging at 0x7fe9ccc643a0>: Traceback (most recent call last):
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/parsers.py", line 212, in parse_args
    mixin_after_parsed_func(self)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/parsers.py", line 905, in __setup_logging
    salt._logging.setup_logging()
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/_logging/impl.py", line 971, in setup_logging
    setup_extended_logging(opts)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/_logging/impl.py", line 878, in setup_extended_logging
    providers = salt.loader.log_handlers(opts)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/loader/__init__.py", line 857, in log_handlers
    _module_dirs(
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/loader/__init__.py", line 153, in _module_dirs
    for entry_point in entrypoints.iter_entry_points("salt.loader"):
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/entrypoints.py", line 29, in _wrapped
    return f(*args, **kwargs)
  File "salt-ext-modules-vmware/venv/lib/python3.8/site-packages/salt/utils/entrypoints.py", line 41, in iter_entry_points
    for entry_point_group, entry_points_list in entry_points.items():
AttributeError: 'EntryPoints' object has no attribute 'items'
heldner commented 8 months ago

I have the same error with salt-ssh:

          File "/var/tmp/.root_66d4a9_salt/pyall/salt/utils/entrypoints.py", line 41, in iter_entry_points
            for entry_point_group, entry_points_list in entry_points.items():
        AttributeError: 'EntryPoints' object has no attribute 'items'
Akm0d commented 3 months ago

I ran into this issue as well, resolved it with

pip install "importlib-metadata<5.0"