AttributeError: module 'certifi' has no attribute 'where'
See original GitHub issueHello,
I found the following issue when using elasticsearch==5.0.0
It seems to be a problem when setting up the connection due to the module ‘certifi’ because it has no attribute ‘where’
Thanks for your help on beforehand.
/opt/conda/lib/python3.5/site-packages/elasticsearch/__init__.py in <module>()
15 logger.addHandler(logging.NullHandler())
16
---> 17 from .client import Elasticsearch
18 from .transport import Transport
19 from .connection_pool import ConnectionPool, ConnectionSelector, \
/opt/conda/lib/python3.5/site-packages/elasticsearch/client/__init__.py in <module>()
2 import logging
3
----> 4 from ..transport import Transport
5 from ..exceptions import TransportError
6 from ..compat import string_types, urlparse
/opt/conda/lib/python3.5/site-packages/elasticsearch/transport.py in <module>()
2 from itertools import chain
3
----> 4 from .connection import Urllib3HttpConnection
5 from .connection_pool import ConnectionPool, DummyConnectionPool
6 from .serializer import JSONSerializer, Deserializer, DEFAULT_SERIALIZERS
/opt/conda/lib/python3.5/site-packages/elasticsearch/connection/__init__.py in <module>()
1 from .base import Connection
2 from .http_requests import RequestsHttpConnection
----> 3 from .http_urllib3 import Urllib3HttpConnection
/opt/conda/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py in <module>()
8 try:
9 import certifi
---> 10 CA_CERTS = certifi.where()
11 except ImportError:
12 pass
AttributeError: module 'certifi' has no attribute 'where'
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
I import wikipedia, I get the error... AttributeError: module ' ...
python - I import wikipedia, I get the error... AttributeError: module 'certifi' has no attribute 'where' - Stack Overflow. Stack Overflow for Teams...
Read more >certifi
Certifi provides Mozilla's carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the ...
Read more >[Fixed] ModuleNotFoundError: No module named 'certifi'
How to Fix “ModuleNotFoundError: No module named 'certifi'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >`mach vendor python` is broken (AttributeError: module 'pip ...
mach vendor python glean-parser==1.14.0. And I'm receiving this error: AttributeError: module 'pip._internal.download' has no attribute 'is_file_url'
Read more >Hello. Try deleting the packag...
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/certifi/init.py", ... AttributeError: type object 'Callable' has no attribute '_abc_registry'.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I encountered this as well.
For a minimal reproduction, run:
What happen is that
import certifi
give a weirdnamespace
, which has nothing:I think you should just add
certifi
to yourinstall_requires
(or improve the check usinghasattr
).For now I can use the workaround of
pip install -U certifi
, but it’s annoying.I just had the same problem here. Installing certifi (using pip) fixed the problem as mentioned above. I’m using both conda and pip. Maybe that’s the problem, because before reinstalling certifi it wasn’t being displayed in the
pip freeze
listing. Maybe the conda version is somehow broken. I’ll try and investigate it further later.