Forecast and earthquake problems in Belchertown skin

85 views
Skip to first unread message

John Clark

unread,
Aug 25, 2018, 4:01:30 AM8/25/18
to weewx-user

(sorry for dupe message, forgot to reply to group)

BTW, if both the dark sky and earthquake settings are disabled in Belchertown/skin.conf  all runs well.

Checked (and modified) permissions to ensure write permissions  on

/home /weewx/public_html/json/darksky_forecast.json and the error messages are unchanged.


On 8/25/2018 1:58 AM, Andrew Milner wrote:
I suspect it may be a permissions issue - check the permissions for the directory and file to ensure they are correct.

FYI weewx has not locked up - it still appears to be running doing whatever tasks it can even though the cheetah generator has exited - which will result in a lack of updated reports of course.



On Saturday, 25 August 2018 09:28:17 UTC+3, John Clark wrote:

My problem is, as follows.

Aug 25 01:10:24 OptiPlex weewx[23765]: acurite: Found station at bus=002 device=006
Aug 25 01:10:24 OptiPlex weewx[23765]: acurite: next read in 12 seconds
Aug 25 01:10:24 OptiPlex weewx[23765]: cheetahgenerator: using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'user.belchertown.getAllStats', 'user.belchertown.getForecast', 'user.belchertown.getEarthquake', 'user.belchertown.getNOAAdata', 'user.belchertown.getSocialShare', 'user.belchertown_highchartsSearchX.highchartsDay', 'user.belchertown_highchartsSearchX.highchartsWeek', 'user.belchertown_highchartsSearchX.highchartsMonth', 'user.belchertown_highchartsSearchX.highchartsYear']
Aug 25 01:10:24 OptiPlex weewx[23765]: manager: Daily summary version is 2.0
Aug 25 01:10:24 OptiPlex weewx[23765]: restx: Wunderground-PWS: Published record 2018-08-25 01:10:00 CDT (1535177400)
Aug 25 01:10:24 OptiPlex weewx[23765]: restx: PWSWeather: Published record 2018-08-25 01:10:00 CDT (1535177400)
Aug 25 01:10:24 OptiPlex weewx[23765]: reportengine: Caught unrecoverable exception in generator weewx.cheetahgenerator.CheetahGenerator
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****  Error writing forecast info to public_html/json/darksky_forecast.json. Reason: [Errno 2] No such file or directory: 'public_html/json/darksky_forecast.json'
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****  Traceback (most recent call last):
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 239, in run
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      obj.start()
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 273, in start
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      self.run()
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 158, in run
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      ngen = self.generate(gen_dict[section_name], self.gen_ts)
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      ngen += self.generate(section[subsection], gen_ts)
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 232, in generate
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      ngen += self.generate(section[subsection], gen_ts)
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 320, in generate
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      default_binding)
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 372, in _getSearchList
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      searchList += obj.get_extension_list(timespan, db_lookup)
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****    File "/home/weewx/bin/user/belchertown.py", line 311, in get_extension_list
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****      raise ValueError( "Error writing forecast info to %s. Reason: %s" % ( forecast_file, e) )
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****  ValueError: Error writing forecast info to public_html/json/darksky_forecast.json. Reason: [Errno 2] No such file or directory: 'public_html/json/darksky_forecast.json'
Aug 25 01:10:24 OptiPlex weewx[23765]:         ****  Generator terminated

Aug 25 01:10:24 OptiPlex weewx[23765]: copygenerator: copied 1 files to /home/weewx/public_html
Aug 25 01:10:24 OptiPlex weewx[23765]: reportengine: Running report FTP
Aug 25 01:10:24 OptiPlex weewx[23765]: reportengine: Found configuration file /home/weewx/skins/Ftp/skin.conf for report FTP
Aug 25 01:10:24 OptiPlex weewx[23765]: ftpupload: Attempting connection to ftp.w0avq.org
Aug 25 01:10:25 OptiPlex weewx[23765]: ftpupload: Connected to ftp.w0avq.org
Aug 25 01:10:26 OptiPlex weewx[23765]: ftpupload: Uploaded file /weather/style.css
Aug 25 01:10:27 OptiPlex weewx[23765]: ftpupload: Made directory /weather/json/darksky_forecast.json
Aug 25 01:10:28 OptiPlex weewx[23765]: ftpgenerator: ftp'd 1 files in 3.64 seconds
Aug 25 01:10:28 OptiPlex weewx[23765]: reportengine: Running report RSYNC
Aug 25 01:10:28 OptiPlex weewx[23765]: reportengine: Found configuration file /home/weewx/skins/Rsync/skin.conf for report RSYNC
Aug 25 01:10:28 OptiPlex weewx[23765]: rsyncgenerator: rsync upload not requested. Skipped.
Aug 25 01:10:36 OptiPlex weewx[23765]: acurite: Found station at bus=002 device=006

I could be wrong in my assessment, but my weewx locks up and doesn't update. I am assuming that what is meant by public_html/json/darksky_forecast.json is referring to
/home
/weewx/public_html/json/darksky_forecast.json which DOES exist, but isn't getting written to. Is my assumption in error and I should look elsewhere for the answer?
--
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,
Aug 25, 2018, 4:45:51 AM8/25/18
to weewx-user
also permissions on the json directory

John Clark

unread,
Aug 25, 2018, 7:09:06 AM8/25/18
to weewx-user

p.ublic_html, json, and darksky_forecast.json all show  Mode: drwxrwxrwx (0777)

weewx shows Mode: drwxr_xr_x (0755) This, I assume, is supposed to be on my computer, not the web server?

gjr80

unread,
Aug 25, 2018, 7:49:31 AM8/25/18
to weewx-user
The issue has nothing to do with permissions, if you look at the error message carefully you will see that the file being written includes a relative path, but relative to what? Just as you were confused about what it was referring to so to is python confused. What ever python is using as the current directory does not have a public_html/json directory so the error is thrown. Pat will need to look at his code, I suspect he needs to make sure his path is relative to WEEWX_ROOT.

As an aside, a default weeWX install sees the weeWX daemon run as root so in such cases permissions are rarely an issue. Running weeWX directly may cause permission issues unless sudo or other privileged access is used.

Gary

Andrew Milner

unread,
Aug 25, 2018, 7:55:37 AM8/25/18
to weewx-user
tx Gary - yea I missed the relative bit - so Pat needs to either be relative to WEEWX_ROOT (or change the path if he is relative to HTML_ROOT) I guess.

Pat

unread,
Aug 25, 2018, 11:12:39 AM8/25/18
to weewx-user
If you leave HTML_ROOT as "belchertown", weewx will do the rest to put it into a sub directory of the StdReport's HTML_ROOT. 

Earthquake and Forecasts use these settings:
earthquake_file = self.generator.skin_dict['HTML_ROOT'] + "/json/earthquake.json"

forecast_file = self.generator.skin_dict['HTML_ROOT'] + "/json/darksky_forecast.json"


John, I'm wondering if within weewx.conf, what do you have under [[Belchertown]] for HTML_ROOT = public_html?

John Clark

unread,
Aug 25, 2018, 3:26:11 PM8/25/18
to weewx-user

If it makes any difference (although I don't think it does on this case) I did the python install and the command I use to start is sudo /etc/init.d/weewx start. Also, since sudo wee_extension --install weewx-belchertown-0.1.tar.gz  didn't work I just copied the contents to the skin directory

Colin Larsen

unread,
Aug 25, 2018, 5:42:49 PM8/25/18
to weewx...@googlegroups.com
You should probably use version 0.4 now.

Did you follow all of Pat's instructions on GitHub for doing a manual installation?

Colin

--
Reply all
Reply to author
Forward
0 new messages