Earthquake still having problems (for me)

133 views
Skip to first unread message

John Clark

unread,
Sep 10, 2018, 9:52:08 AM9/10/18
to weewx-user

Still having "earthquake" problem. I noticed something that may make no difference but not sure how I would fix it.

I removed any "Belchertown" file/directory I could find and installed 0.7 with wee install, ran a few syslog loops and came up with the following:

Sep 10 08:05:18 OptiPlex weewx[15703]: Belchertown Extension: version 0.7
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: units=1 winddir=346.956499898 pressure=29.834265283 first_p=29.810304082 last_p=29.8495650658
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: pressure=1010.30402681 month=8 winddir=15 trend=0.443176434794 north=True
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: code is C
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: generated 1 forecast record
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: saving 1 forecast records
Sep 10 08:05:18 OptiPlex weewx[15703]: manager: Added record 2018-09-10 08:05:00 CDT (1536584700) to database 'forecast.sdb'
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: saved 1 forecast records
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: deleting forecasts prior to 1535979918
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: deleted forecasts prior to 1535979918
Sep 10 08:05:18 OptiPlex weewx[15703]: forecast: ZambrettiThread: Zambretti: terminating thread
Sep 10 08:05:18 OptiPlex weewx[15703]: restx: CWOP: Connected to server cwop.aprs.net:14580
Sep 10 08:05:19 OptiPlex weewx[15703]: restx: PWSWeather: Published record 2018-09-10 08:05:00 CDT (1536584700)
Sep 10 08:05:19 OptiPlex weewx[15703]: restx: Wunderground-PWS: Published record 2018-09-10 08:05:00 CDT (1536584700)
Sep 10 08:05:19 OptiPlex weewx[15703]: Belchertown Extension: New forecast file downloaded to /var/www/html/weewx/json/darksky_forecast.json
Sep 10 08:05:19 OptiPlex weewx[15703]: restx: WeatherCloud: Published record 2018-09-10 08:05:00 CDT (1536584700)
Sep 10 08:05:19 OptiPlex weewx[15703]: reportengine: Caught unrecoverable exception in generator weewx.cheetahgenerator.CheetahGenerator
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****  Error downloading earthquake data. Check the URL and try again. You are trying to use URL: http://earthquake.usgs.gov/fdsnws/event/1/query?limit=1&lat=37.212907&lon=-89.529325&maxradiuskm=1000&format=geojson&nodata=204&minmag=2, and the error is: <urlopen error [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure>
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****  Traceback (most recent call last):
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 239, in run
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      obj.start()
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 273, in start
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      self.run()
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 158, in run
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      ngen = self.generate(gen_dict[section_name], self.gen_ts)
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 232, in generate
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      ngen += self.generate(section[subsection], gen_ts)
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 232, in generate
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      ngen += self.generate(section[subsection], gen_ts)
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 320, in generate
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      default_binding)
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 372, in _getSearchList
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      searchList += obj.get_extension_list(timespan, db_lookup)
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****    File "/usr/share/weewx/user/belchertown.py", line 466, in get_extension_list
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****      raise ValueError( "Error downloading earthquake data. Check the URL and try again. You are trying to use URL: %s, and the error is: %s" % ( earthquake_url, error ) )
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****  ValueError: Error downloading earthquake data. Check the URL and try again. You are trying to use URL: http://earthquake.usgs.gov/fdsnws/event/1/query?limit=1&lat=37.212907&lon=-89.529325&maxradiuskm=1000&format=geojson&nodata=204&minmag=2, and the error is: <urlopen error [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure>
Sep 10 08:05:19 OptiPlex weewx[15703]:         ****  Generator terminated
Sep 10 08:05:19 OptiPlex weewx[15703]: copygenerator: copied 22 files to /var/www/html/weewx
Sep 10 08:05:19 OptiPlex weewx[15703]: reportengine: Running report forecast
Sep 10 08:05:19 OptiPlex weewx[15703]: reportengine: Found configuration file /etc/weewx/skins/forecast/skin.conf for report forecast
Sep 10 08:05:19 OptiPlex weewx[15703]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.forecast.ForecastVariables']
Sep 10 08:05:19 OptiPlex weewx[15703]: manager: Daily summary version is 2.0
Sep 10 08:05:20 OptiPlex weewx[15703]: cheetahgenerator: Generated 12 files for report forecast in 0.47 seconds
Sep 10 08:05:20 OptiPlex weewx[15703]: copygenerator: copied 87 files to /var/www/html/weewx/forecast
Sep 10 08:05:20 OptiPlex weewx[15703]: reportengine: Running report Highcharts_Belchertown
Sep 10 08:05:20 OptiPlex weewx[15703]: reportengine: Found configuration file /etc/weewx/skins/Highcharts_Belchertown/skin.conf for report Highcharts_Belchertown
Sep 10 08:05:20 OptiPlex weewx[15703]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.belchertown_highchartsSearchX.highchartsDay', 'user.belchertown_highchartsSearchX.highchartsWeek', 'user.belchertown_highchartsSearchX.highchartsMonth',

The text in red is what I noticed. If I copy and paste the URL, the website changes it to https://(etc) and I can read the info without a fuss. If this is the problem, is there something I can do on my end to fix it, and where? Also, as before, as long as earthquakes are activated, no information is updated either locally or remotely (ftp, CWOP, etc) but when I change it back to "0" all seems to work fine.
--
John Clark

Pat

unread,
Sep 10, 2018, 10:56:38 AM9/10/18
to weewx-user
Hi John, I know I asked this before but don't think I saw a reply. I may have lost it in the shuffle. 

This looks like it could be due to an outdated Python module. When was the last time you've updated your system? 

What is the output when you run this command:

python -c "exec(\"import urllib2\\nprint urllib2.__version__\")"

Thomas Keffer

unread,
Sep 10, 2018, 11:54:48 AM9/10/18
to weewx-user
Try using https (instead of http)

-tk

--
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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pat

unread,
Sep 10, 2018, 12:11:17 PM9/10/18
to weewx-user
USGS will auto-promote the client to https. The error of  SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure may indicate that either Python is < 2.7.9 or urllib2 is < 2.7. 

This post seems to indicate that 2.7.9 should resolve the SSL handshake error seen here. Others say upgrading OpenSSL to the latest will resolve it. Maybe upgrading both are the magic sauce. 

Another fix is to switch to Python requests, but I'm trying to keep dependencies to a minimum. 

Thomas Keffer

unread,
Sep 10, 2018, 12:14:54 PM9/10/18
to weewx-user
On Mon, Sep 10, 2018 at 9:11 AM Pat <p...@obrienphoto.net> wrote:
USGS will auto-promote the client to https.

It didn't for me. I tried 


and it came back with an HTML page that said the resource had "moved permanently."

-tk
Message has been deleted

Pat

unread,
Sep 10, 2018, 12:44:14 PM9/10/18
to weewx-user
I'm back at my computer and the curl -L command below worked for me. 

John, try this and see what it does?




On Monday, September 10, 2018 at 12:23:58 PM UTC-4, Pat wrote:
Interesting. Urllib2 should follow redirect to https  

I hadn't tried with curl, but if you try with curl -L, what happens? It should follow the https redirect. 

Pat

On Mon, Sep 10, 2018, 12:14 PM Thomas Keffer <> wrote:
On Mon, Sep 10, 2018 at 9:11 AM Pat <> wrote:
USGS will auto-promote the client to https.

It didn't for me. I tried 


and it came back with an HTML page that said the resource had "moved permanently."

-tk

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/SrYsEdp9eK8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to

John Clark

unread,
Sep 10, 2018, 6:51:33 PM9/10/18
to weewx...@googlegroups.com

Must have missed the memo. Yes I am at

john@OptiPlex ~ $ python -c "exec(\"import urllib2\\nprint urllib2.__version__\")"
2.7


 so.... sudo apt-get update python?

living about 50 miles from New Madrid, Mo where there were five earthquakes at 8.0 or better in the early 1800's, I do have some small earthquake curiosity.


On 9/10/2018 11:11 AM, Pat wrote:
USGS will auto-promote the client to https. The error of  SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure may indicate that either Python is < 2.7.9 or urllib2 is < 2.7. 

This post seems to indicate that 2.7.9 should resolve the SSL handshake error seen here. Others say upgrading OpenSSL to the latest will resolve it. Maybe upgrading both are the magic sauce. 

Another fix is to switch to Python requests, but I'm trying to keep dependencies to a minimum. 


On Monday, September 10, 2018 at 11:54:48 AM UTC-4, Thomas Keffer wrote:
Try using https (instead of http)

-tk

On Mon, Sep 10, 2018 at 7:56 AM Pat <p...@obrienphoto.net> wrote:
Hi John, I know I asked this before but don't think I saw a reply. I may have lost it in the shuffle. 

This looks like it could be due to an outdated Python module. When was the last time you've updated your system? 

What is the output when you run this command:

python -c "exec(\"import urllib2\\nprint urllib2.__version__\")"


--snip--

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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pat

unread,
Sep 10, 2018, 6:55:57 PM9/10/18
to weewx-user
I'm am thinking a sudo apt update python will fix it.... 

Before you do that, what is the output of 

python -V

and

dpkg -s openssl | grep '^Version:'

John Clark

unread,
Sep 10, 2018, 11:46:03 PM9/10/18
to weewx...@googlegroups.com

I get


john@OptiPlex ~ $ python -V
Python 2.7.6
john@OptiPlex ~ $ dpkg -s openssl | grep '^Version:'
Version: 1.0.1f-1ubuntu2.26
john@OptiPlex ~ $

--
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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Clark

unread,
Sep 11, 2018, 5:23:12 PM9/11/18
to weewx...@googlegroups.com

In response to several requests for info, I got the following

john@OptiPlex ~ $ python -V
Python 2.7.6

john@OptiPlex ~ $ python -c "exec(\"import urllib2\\nprint urllib2.__version__\")"
2.7

john@OptiPlex ~  $ curl -L "http://earthquake.usgs.gov/fdsnws/event/1/query?limit=1&lat=37.212907&lon=-89.529325&maxradiuskm=1000&format=geojson&nodata=204&minmag=2"
{"type":"FeatureCollection","metadata":{"generated":1536699478000,"url":"https://earthquake.usgs.gov/fdsnws/event/1/query?limit=1&lat=37.212907&lon=-89.529325&maxradiuskm=1000&format=geojson&nodata=204&minmag=2","title":"USGS Earthquakes","status":200,"api":"1.5.8","limit":1,"offset":1,"count":1},"features":[{"type":"Feature","properties":{"mag":3.3,"place":"27km WSW of Perry, Oklahoma","time":1536682289070,"updated":1536689583628,"tz":-360,"url":"https://earthquake.usgs.gov/earthquakes/eventpage/us2000hcrq","detail":"https://earthquake.usgs.gov/fdsnws/event/1/query?eventid=us2000hcrq&format=geojson","felt":2,"cdi":2,"mmi":null,"alert":null,"status":"reviewed","tsunami":0,"sig":168,"net":"us","code":"2000hcrq","ids":",us2000hcrq,","sources":",us,","types":",dyfi,geoserve,origin,phase-data,","nst":null,"dmin":0.28,"rms":0.09,"gap":48,"magType":"mb_lg","type":"earthquake","title":"M 3.3 - 27km WSW of Perry, Oklahoma"},"geometry":{"type":"Point","coordinates":[-97.5769,36.2113,3.79]},"id":"us2000hcrq"}]}john@OptiPlex ~/Downloads $

john@OptiPlex ~  $ dpkg -s openssl | grep '^Version:'
Version: 1.0.1f-1ubuntu2.26

On 9/10/2018 5:55 PM, Pat wrote:
I'm am thinking a sudo apt update python will fix it.... 
Before you do that, what is the output of 

python -V

and

dpkg -s openssl | grep '^Version:'

So I did the following

john@OptiPlex ~ $ sudo apt update python
[sudo] password for john:
E: The update command takes no arguments

john@OptiPlex ~ $ sudo apt update
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security/main amd64 Packages            
Hit http://linux.teamviewer.com stable InRelease                              
Ign http://archive.ubuntu.com trusty InRelease                                
Ign http://archive.canonical.com trusty InRelease                             
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages      
Hit http://linux.teamviewer.com preview InRelease                             
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages     (with many more, snipped for brevity)

and am still on 2.7.6. Doing a bit of looking around I came upon


Python 2.7.15
Release Date: 2018-05-01
Python 2.7.15 is a bugfix release in the Python 2.7 series.

so I downloaded both

/home/john/Downloads/Python-2.7.15.tar.xz
/home/john/Downloads/Python-2.7.15.tgz

just to be sure. So my question now is do I do a "sudo apt-get upgrade" or do I upgrade/install one of these (I really don't want to break something) or is there another, potentially less perilous alternative I should consider?


On Monday, September 10, 2018 at 6:51:33 PM UTC-4, John Clark wrote:

Must have missed the memo. Yes I am at

john@OptiPlex ~ $ python -c "exec(\"import urllib2\\nprint urllib2.__version__\")"
2.7


 so.... sudo apt-get update python?

living about 50 miles from New Madrid, Mo where there were five earthquakes at 8.0 or better in the early 1800's, I do have some small earthquake curiosity.


Pat

unread,
Sep 11, 2018, 8:13:50 PM9/11/18
to weewx-user
John without knowing your full system setup, let's not do the Python update right now. The curl command worked for you which is promising. 

I've made some updates to the bin/user/belchertown.py to try and fall back to curl if the first attempt with urllib2 fails (which it is for you). This is a beta test to see if it works for you. 

  1. Download this file attached
  2. Stop weewx
  3. Set debug = 1 in weewx.conf
  4. Rename the bin/user/belchertown.py file to belchertown_0-7.py so you can revert back if needed
  5. Upload this new file you just downloaded into bin/user
  6. Restart weewx and see if we get any errors. 

If it works and is successful, you can stop weewx, set debug = 0 in weewx.conf and restart weewx again and you should be good to go with the earthquake data.

Let me know how it goes...
belchertown.py

John Clark

unread,
Sep 11, 2018, 11:33:57 PM9/11/18
to weewx...@googlegroups.com

SUCCESS!!!

BTW, I am running Linux Mint19 on a Dell Optiplex 790. Now for two potentially silly questions that don't much matter, but I am curious


1. Occasionally the display of my accurite 5-in-1 says to connect it to a computer to download the weather data on it.I am assuming this is a hard coded Windows thing?

2. What is the WOW setting in weewx.conf? if I google it all I get is references to World of Warcraft. Am I crazy, or is it just that?

--
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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Milner

unread,
Sep 12, 2018, 12:58:35 AM9/12/18
to weewx-user
WOW = uk met office

1.  sounds as though your station may be losing usb or radio connection (depending on how your station connects to PC) from time to time.  a Windows thing??!! - don't you mean a LINUX thing???!!!
Reply all
Reply to author
Forward
0 new messages