I have an older version of Weewx and as such, older versions of the 
plugins.  This post references the forecast.inc plugin version 3.2.14 but 
it might be helpful for later versions also.

My forecast.py plugin stopped working and my syslog showed this 

 forecast: NWSThread: NWS: downloading forecast from 
'http://forecast.weather.gov/product.php?site=NWS&product=PFM&format=txt&issuedby=MLB'
Aug  2 20:22:15 weather weewx[1091]: forecast: NWSThread: NWS: failed 
attempt 1 to download NWS forecast: <urlopen error [SSL: 
CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>

This is what fixed it.  

I went to the forecast.py source in

/usr/share/weewx/user

added

import ssl

in the import section of the code and then added this in the 

def NWSDownloadForecast(foid, url=NWS_DEFAULT_PFM_URL, max_tries=3):

function

            ctx = ssl.create_default_context()
            ctx.check_hostname = False
            ctx.verify_mode = ssl.CERT_NONE
            response = urllib2.urlopen(u, context=ctx)
            """below is the original now commented out source line"""
            """response = urllib2.urlopen(u)"""

Now my forecast is working perfectly fine.

Bob

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/1230af2b-e948-4071-9aee-0030edfe9535n%40googlegroups.com.

Reply via email to