Skip to content
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

Mirco-ecommerce build faied with AttributeError: 'EntryPoints' object has no attribute 'get' (Providing for the Community - Not a Question) #65

Open
VolodymyrSmahliuk opened this issue Aug 17, 2023 · 0 comments

Comments

@VolodymyrSmahliuk
Copy link

VolodymyrSmahliuk commented Aug 17, 2023

Description

I was helping my co-worker to build the ./micro-ecommerce folder with Docker Compose. We tried to run the docker-compose up --build command against it, but the AttributeError: 'EntryPoints' object has no attribute 'get' error occurred. Here is the library where the problem is.

Click to show full error/trace message
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 345, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 76, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 63, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.7/site-packages/django/conf/__init__.py", line 142, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/src/app/config/__init__.py", line 1, in <module>
    from .celery import app as celery_app
  File "/usr/src/app/config/celery.py", line 1, in <module>
    from celery import Celery, bootsteps
  File "/usr/local/lib/python3.7/site-packages/celery/bootsteps.py", line 8, in <module>
    from kombu.common import ignore_errors
  File "/usr/local/lib/python3.7/site-packages/kombu/common.py", line 16, in <module>
    from .entity import Exchange, Queue
  File "/usr/local/lib/python3.7/site-packages/kombu/entity.py", line 9, in <module>
    from .serialization import prepare_accept_content
  File "/usr/local/lib/python3.7/site-packages/kombu/serialization.py", line 456, in <module>
    for ep, args in entrypoints('kombu.serializers'):  # pragma: no cover
  File "/usr/local/lib/python3.7/site-packages/kombu/utils/compat.py", line 93, in entrypoints
    for ep in importlib_metadata.entry_points().get(namespace, [])
AttributeError: 'EntryPoints' object has no attribute 'get'

Solution

After the research, we found the main problem (celery/celery#7783 and). The solution was to lock the version of importlib-metadata<5.0 library in the requirements.txt file.

@VolodymyrSmahliuk VolodymyrSmahliuk changed the title Mirco-ecommerce build faied with AttributeError: 'EntryPoints' object has no attribute 'get' Mirco-ecommerce build faied with AttributeError: 'EntryPoints' object has no attribute 'get' (Providing for the Community - Not a Question) Aug 18, 2023
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

No branches or pull requests

1 participant