1

I am trying to publish a python package to Pypi using Python twine command. However, it failed when running twine and got errors that seems point to certifi and requests package. Can anyone help? Much appreciated! I get an error says:

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)

I turned on my --verbose and made sure my password was read in correctly.

First I tried:

twine upload --verbose .\dist\zwwgeodemo-0.0.1.tar.gz

Second I tried:

twine upload --verbose .\dist\zwwgeodemo-0.0.1.tar.gz --cert C:\ProgramData\Anaconda3\envs\demo\Lib\site-packages\certifi\cacert.pem

The errors looks like this:-

enter image description here

I am working on Windows 10, Python version 3.8.8, twine version 3.3.0, certifi version 2020.12.5, and requests version 2.25.1 Thank you in advance!

Anurag Dabas
  • 23,866
  • 9
  • 21
  • 41
  • There is probably nothing wrong in `requests` or `certifi`; they are just refusing to connect because the certificate is invalid. Fix the certificate or connect to a site which you have actually configured your computer to trust. – tripleee Mar 12 '21 at 10:17
  • @tripleee. Thank you so much! I've been waiting to get some direction. Forgive my ignorance, could you please give some hint about how could I fix my certificate? Thanks in advance! – jackzhaowei Mar 12 '21 at 17:46
  • I'm afraid your question doesn't contain enough information to properly troubleshoot this. Perhaps look into how your trusted certificates are configured and compare against a working configuration. – tripleee Mar 14 '21 at 11:54
  • @tripleee.Sorry for the lack of information. Where I can I look for my trusted certificates and a working configuration? My OS is windows 10. My laptop is also company's laptop and I using NetScalar, which is a VPN. Do you think that would cause such issue? Thanks! – jackzhaowei Mar 15 '21 at 00:32
  • If the VPN requires you to use a proxy, that's vaguely suspicious. But ask your local IT; they should know better what's normal and expected in your environment. – tripleee Mar 15 '21 at 06:32

0 Answers0