SSL verification false or set alternative path
Closed this issue · 2 comments
Is your feature request related to a problem? Please describe.
tried this command in terminal
sphobjinv suggest https://docs.sqlalchemy.org/ 'cascade' -su 50
returns
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)>
certifi was installed in the environment
Describe the solution you'd like
sphobjinv suggest https://docs.sqlalchemy.org/ 'cascade' -su 50 --verify false
returns suggestion results.
Describe alternatives you've considered
sphobjinv find https://docs.sqlalchemy.org/
returns the link where the objects.inv is located and let the user download it manually.
Then they can use the sphobjinv locally.
Additional context
Thanks for the problem report & request!
First: so I know, what Python version are you using?
Second, can you provide the output of pip list
?
Starting at the bottom first:
returns the link where the objects.inv is located and let the user download it manually.
If your SSL certificate verification is broken, then a different sphobjinv
subcommand will break in the same way as sphobjinv suggest
for any HTTPS URL. So, this doesn't help your situation.
sphobjinv suggest https://docs.sqlalchemy.org/ 'cascade' -su 50 --verify false
Can you try the following code in a REPL launched from the environment where sphobjinv is installed, to make sure that a --no-cert-verify
option would actually solve your problem?
>>> import sphobjinv as soi
>>> import ssl
>>> soi.Inventory._sslcontext.check_hostname = False
>>> soi.Inventory._sslcontext.verify_mode = ssl.VerifyMode.CERT_NONE
>>> soi.Inventory(url="https://docs.sqlalchemy.org/objects.inv")
Inventory(project='SQLAlchemy', version='1.4', source_type=<SourceTypes.URL: 'url'>)
Thanks again!
Given that this has been idle for over a year, I'm going to close it.
If this is still an active problem, please attempt the test commands I provided at the end of my prior comment and report how it goes. I'll gladly reopen.