Monday, June 7, 2021

Python PIP Upgrade or Install Fails : SSL: CERTIFICATE_VERIFY_FAILED behind Proxy

If you're behind a proxy or getting these errors when installing or upgrading python packages or PIP itself

python -m pip install --upgrade pip

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /simple/pip/


Then try these extra parameters to trust Python sites (only do this if you trust the proxy)

python -m pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org --upgrade pip

Collecting pip

  Downloading pip-21.1.2-py3-none-any.whl (1.5 MB)

     |████████████████████████████████| 1.5 MB 1.3 MB/s

Friday, June 4, 2021

Windows Event TimeGenerated TimeWritten Date Conversion Powershell

In windows event logs if you see


TimeGenerated=1622614277	TimeWritten=1622614277	


and want the actual time use the .NET/powershell code


[timezone]::CurrentTimeZone.ToLocalTime(([datetime]'1/1/1970').AddSeconds("1622614277"))


Wednesday, June 2, 2021 1:11:17 AM