'EntryPoints' object has no attribute 'get' - Digital ocean
Asked Answered
P

6

77

I have made a deplyoment to Digital ocean, on staging (Heroku server) the app is working well, but Digital ocean it's failing with the error below, what could be the issue :

AttributeError at /admin/
'EntryPoints' object has no attribute 'get'
Request Method: GET
Request URL:    https://xxxx/admin/
Django Version: 3.1
Exception Type: AttributeError
Exception Value:    
'EntryPoints' object has no attribute 'get'
Exception Location: /usr/local/lib/python3.7/site-packages/markdown/util.py, line 85, in <module>
Python Executable:  /usr/local/bin/python
Python Version: 3.7.5
Python Path:    
['/opt/app',
 '/usr/local/bin',
 '/usr/local/lib/python37.zip',
 '/usr/local/lib/python3.7',
 '/usr/local/lib/python3.7/lib-dynload',
 '/usr/local/lib/python3.7/site-packages',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf',
 '/usr/local/lib/python3.7/site-packages/odf']
Server time:    Sun, 02 Oct 2022 21:41:00 +0000
Picard answered 2/10, 2022 at 21:43 Comment(1)
can you paste the url for the source of markdown here please?Malayan
F
116

Because importlib-metadata releases v5.0.0 yesterday which it remove deprecated endpoint.

You can set importlib-metadata<5.0 in ur setup.py so it does not install latest version.

Or if you use requirements.txt, you can as well set importlib-metadata below version 5.0 e.g importlib-metadata==4.13.0

For more info: https://importlib-metadata.readthedocs.io/en/latest/history.html

Foliaceous answered 3/10, 2022 at 8:1 Comment(8)
This works, thanks. I notice that importlib-metadata is in the stack trace of errors and decided to try out your solution.Hanleigh
Am still confused about setup.py, since am using Django with requirements.txt is this where am supposed to set importlib-metadata==4.13.0 ?Picard
It worked finallyPicard
This also creates an issue when using xarray.open_dataset()Tanney
This also solved a similar issue I had with python3.7 and bandit==1.7.1Burrton
Solved issue with celery with shadow installation of latest version of import-libParasiticide
!pip install importlib-metadata==4.13.0 will solve the problem. It will also work for those having issues getting xarray to work in Google Colab.Pipit
has this been fixed in v6.0.0?Dixil
T
18

As importlib-metadata released v5.0.0, it removed the deprecated endpoint. So Use the older version and do not install the latest version.

!pip install importlib-metadata==4.13.0

Use this in the terminal/Collab to get an older version(v4.13.0).

Toreador answered 17/10, 2022 at 13:23 Comment(1)
!pip install importlib-metadata==4.13.0 will solve the problem. It will also work for those having issues getting xarray to work in Google ColabPipit
W
13

If you are using certain forks of Redash or even the official Redash, you need to pin its importlib-metadata to 4.12.0 in the requirements_bundles.txt

Words answered 4/10, 2022 at 18:41 Comment(0)
M
8

I was running Django on Google App Engine and encountered the same error.

I checked the source and found that the error occurred in a built-in python function.

I updated to Python 3.9 and the error was resolved.

I was originally using python 3.7.

I don't know if this helps, but FYI.

Momentarily answered 3/10, 2022 at 7:7 Comment(0)
N
2

Upgrade your flake8. The newest versions do not hit this issue – @AmaJayJB

Nadiya answered 9/1, 2024 at 13:39 Comment(0)
M
1

Adding to @Zach answer:

If you are using certain forks of Redash or even the official Redash, you need to pin its importlib-metadata to 4.13.0 in the requirements_bundles.txt.

If you are running on docker, don't forget to rebuild your docker containers.

docker-compose build 
docker-compose up -d
Mitchum answered 31/10, 2022 at 23:24 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.