Weather-Display Clientraw Generation from Weewx

1,492 views
Skip to first unread message

Oz Greg

unread,
Apr 3, 2013, 7:24:37 AM4/3/13
to weewx...@googlegroups.com
All,

I been tracking Weewx progress for the last six months or so and been impressed with the leaps it has taken especially around running on a Raspberry PI.  One of the biggest issues I have in moving to Weewx on my PI is discarding the large time and $  investment I have made in utilising the (excellent WD and WDL software) on my site which leads me to this post..

Looking through the Weewx manual I believe I can get pretty close to duplicating the data requirements for the WDL clientraw format however I am looking for some feedback from some the brains trusts here if this would be feasible to attempt or am I nuts in even attempting this..

The copy of the format can be found here..  http://www.tnetweather.com/nb-0100.php

Thanks for your Replies..






Thomas Keffer

unread,
Apr 3, 2013, 12:23:12 PM4/3/13
to weewx-user
Hi, Greg

Looking through the WD spec, I would agree: it does not look very hard. Indeed, many of the fields could be generated easily enough just using the plain vanilla $tag syntax that weewx uses. For the fields for which weewx has no direct analog, there are instructions in the Customizing guide for how to write reporting extensions. 

I'm a little hazy in the details of what you intend to do. You are thinking of substituting weewx for WD to control your weather station, but keep the WD facilities on your webserver? I assume the two would communicate by ending the clientraw files from weewx to the server?

-tk








--
You received this message because you are subscribed to the Google Groups "Weewx user's group" 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/groups/opt_out.
 
 



--
Tom Keffer
kef...@threefools.org
+1 541-386-8891 (h)
+1 541-490-9507 (c)
Skype: tkeffer

Maarten van der Hoeven

unread,
Apr 3, 2013, 2:04:52 PM4/3/13
to weewx...@googlegroups.com
That would be cool! I have a Weather Display Live license laying around; would be nice to add that because of the fact weewx can spit clientraw as well!
 

Op woensdag 3 april 2013 13:24:37 UTC+2 schreef Oz Greg het volgende:

Oz Greg

unread,
Apr 3, 2013, 7:20:32 PM4/3/13
to weewx...@googlegroups.com
Yes is my intention to simulate the creation of the clientraw (and others) files thus keeping the WD WDL (Flash) aspects working on my website, we will see if I will keep the Carter Lake Templates as well which also rely on WD clientraw files or dump them with the Weemx templates, I do like the Carter Lake Templates for it's pure HTML performance aspect.. 

I suspect a number of Weemx lurkers are like me, WD users as it seems Weemx under a linux environment is a better fit than WD on the PI which is pretty broken on the PI and we have given up waiting this to happen..

Thanks for the tip on the custom TAGS I will study the TAG and see how close I am going to get.  I already know I am going to strike some complexities around Australian Weather as our readings RESTART from 9AM so expect a few more posts when I start to get into the complex aspects.. 

If people would like to help out I am happy to GITHUB what I am working on as many hands make light work..

Paul G

unread,
Apr 7, 2013, 3:43:40 PM4/7/13
to weewx...@googlegroups.com


On Wednesday, April 3, 2013 7:24:37 AM UTC-4, Oz Greg wrote
The copy of the format can be found here..  http://www.tnetweather.com/nb-0100.php

I convert (the last) archive records to client.raw to feed an app on my phone.  Doing this I discovered that:
1) Client.raw is an informal and evolving spec.
2) Given 1 people writing client.raw consumers make any number of assumptions (like where the end of record marker can be found).
3) Those assumptions are only exposed when you write a client.raw producer.

Presumably given a properly documented consumer this isn't an issue.

Since I hope to switch from client.raw to Yowindow an external processor is a win.

Oz Greg

unread,
May 3, 2013, 10:23:13 AM5/3/13
to weewx...@googlegroups.com
I have started producing the WD stats (for now as a Skin) and I will setup an area for others to share in what I been doing soon as I expect a few others have followed the WD path to here..

I managed to get the bulk of the dynamic parts of clientraw generated but hit the first of the series of challenges..

clientraw requires certain measurements in hourly buckets (ie wind avg speed every hour from the current hour working backwards for the last 20 hours) but weewx naturally works in $day or $current but does not really know hours 

I am a little stuck on how to approach this and love some pointers..

Thanks All..

Thomas Keffer

unread,
May 3, 2013, 10:35:09 AM5/3/13
to weewx-user
Yes, your diagnosis is correct.

You will have to write a custom report generator and, in it, either use a convenience member function on class archive.Archive, or form your own SQL statement, to get the hourly data you need. There have been a couple threads about this subject. Here's one. A couple of responses down I give an example that uses the member function getSqlVectorsExtended().

I've been working on a more general stats strategy that would allow hourly aggregates, but with all the nice weather here in Oregon, progress has been slow.

-tk




--
You received this message because you are subscribed to the Google Groups "Weewx user's group" 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/groups/opt_out.
 
 

Oz Greg

unread,
May 3, 2013, 11:10:17 AM5/3/13
to weewx...@googlegroups.com
Hmmm thanks Tom, I looked at your  getSqlVectorsExtende and clearly this will led to a report generation performance that would be in the 1000's of reads considering the scope of the number of different measurements by the hour. Clear some thought is going to be required for this..

Thanks..

Thomas Keffer

unread,
May 3, 2013, 11:14:24 AM5/3/13
to weewx-user
I don't think so. The function getSqlVectors() returns a vector of aggregated data (could be one hour) and, for most types, does it in a single SQL query. 

In any case, one thing I've learned, "late binding" is where it's at. You do not want to cache results and use them for the next report. 

-tk

Oz Greg

unread,
May 3, 2013, 7:20:35 PM5/3/13
to weewx...@googlegroups.com
Thanks Tom I will write up a few of the vector's and assess the impact required to generate the data.  It looks like I will need wind speed, direction, Gust, Temp (Out) readings every hour for 10-15 hours.. 

gjr80

unread,
May 7, 2013, 12:18:46 AM5/7/13
to weewx...@googlegroups.com
Hi Greg,

Do please keep us informed on any progress you make. I have come to want to generate a clientraw.txt as well, not to feed WD or WDL but rather to drive my web page which I have based upon the Saratoga templates with a 'WD' feed. I have Weewx producing a partially populated (I don't need all of the data in clientraw.txt for my site) clientraw.txt via a skin, but with an archive period of 5 minutes I am missing out on being able to dynamically update some of my observations. I did have Weewx producing an even more cut down clientraw.txt based upon every 5th or so loop record. This was done via a custom generator as per Tom's examples in the Customizing Weewx document - I used the myPrint example. Have not taken this any further, my main issue has been the trade off between skins (Cheetah's power and flexibility and ready access to aggregated data) and a custom generator based on loop data (pure Python programming, no Cheetah access). Of course processor load is a concern when playing with loop data given the 2 odd second period of loop data compared to the 5 minute period of archive data. Of course my limited Python skills also have a big influence!

regards,

Gary

Oz Greg

unread,
May 8, 2013, 12:10:36 AM5/8/13
to weewx...@googlegroups.com
I have actually finished generation of the clientraw and partial generation of some of the testtags.php however I need to implement an some kind of hourly data recording.  I am not sure if it will be another DB which I believe is the best approach and I just code it or a SQL statement reading from the archive DB  which will have an overhead..

To do is the clientextra, hourly text files but I need to get the hourly DB concept worked out..  As soon as I get that worked out I will push all my files out to to the site I quickly setup

Thomas Keffer

unread,
May 8, 2013, 12:32:13 AM5/8/13
to weewx-user
I should think a separate database, with a "cleanup" algorithm that deletes old data, would be  best. I believe this is the approach Peter Finley took with his website.

-tk


--
You received this message because you are subscribed to the Google Groups "Weewx user's group" 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/groups/opt_out.
 
 

Oz Greg

unread,
May 8, 2013, 12:49:36 AM5/8/13
to weewx...@googlegroups.com
Tom,

I believe this is also going to be the best approach as well as I want to keep the number of reads down to a minimum as the hourly data requirements are very extensive and I do not want to stress the PI hardware..

So far I have created a unique wd template and a unique wd.py processor in the user directory and feeling confident that at the end I will be able to generate the full range of text files..

Clientraw.txt
Clientrawextra.txt
Clientrawdaily.txt
Clientrawhour.txt

which would make weewx output compatible with Weather Display Live (Flash), Steel Gauge (HTML5) and Carter Lake HTML templates (Flash / Java / HTML) which pretty much will extend weewx project capabilities very nicely.. 

Oz Greg

unread,
May 20, 2013, 6:17:28 PM5/20/13
to weewx...@googlegroups.com
Just a little progress report on this project..

So far I have managed to get the majority of the clientraw.txt fields fully populated and the hourly data in clientrawextra.txt also populated..  My WDL (http://www.ozgreg.com/wdl/) is now starting to correctly populate it's hourly graphs (monthly is next clientrawdaily.txt).

Got to send a thanks to both Tom and William for helping me out with some pointers..  Getting the hourly data has been slow heavy work but I broke the back of that and moving onwards to Monthly next which I predict will be a lot faster to generate thanks to the robust existing tag support..

Nothing to share yet as it is all way to alpha once I get the next file complete I will start to populate a GIT

Greg

Oz Greg

unread,
May 27, 2013, 7:54:03 AM5/27/13
to weewx...@googlegroups.com
An update for us ex WD people..  I have been making great progress on the WD Clientraw generation and have most of the daily, yearly, all time, hourly stats are in pretty good shape..

My WDL dashboard is now fairly complete (yes it is missing the "day of the week" stats but overall starting to look very polished..

I have moved the project over to bitbucket as I found SourceTree windows app nicely manages 99% of what I need to do  so I switched over..

New project location (including yes downloads) https://bitbucket.org/ozgreg/weewx-wd

Still beta and yes the installation instructions need work but it you know your away around weewx feel free to install and start using and if someone would like to provide us with some better installation instructions I be very happy to add them in..

Gary has been working on the testtag.php generation which was lagging behind the clientraw file generation so we will also be able also support Saratoga-Weather (http://saratoga-weather.org/scripts-WD-AJAX.php) scripts very shortly as well..

John Canfield

unread,
May 27, 2013, 10:02:38 AM5/27/13
to weewx...@googlegroups.com
Very cool project Greg.  I used WD years ago and found it to be a bit cranky but maybe it got more polished as the years passed.  I've been hanging out waiting on you talented guys to come up with a very polished skin and I think you're on the right track :)

When I was looking at your project description I noticed Although weewx has a substantial temperature measurement capture, WD requires the capture of two additional Temperature Measurements (Apparent Temp and Humidex). These additional temperature types have been captured in extraTemp1 and extraTemp2.

I use extraTemp 1 for another temperature sensor (I monitor a freezer in an outbuilding on our property) so how would that fit with your schema?

John
weather.janeandjohn.org
Amateur radio wb5tht

Oz Greg

unread,
May 27, 2013, 6:37:50 PM5/27/13
to weewx...@googlegroups.com
Hi John,

WD always had it's issue I think it was due to its continuous bloat as more and more weather stations got tacked onto the core, Brian keeps on talking about a rewrite but I think that is not likely....  That said and done I found it stable but I just used it for it's raw data capability not for the 1000 other odd features it had instead used WDL and Carter Lake Templates.

I always loved the Carter Lake Templates and had many a version running on my website for years so switching to weewx has prompted me to roll them out again and give them a polish..

In regards to the Temp no issues is say moving the WD data to say soilTemp3 and soilTemp4 but you will need to change wd.py to point to the new fields, schema.py to add the extra SoilTemp fields to the stats DB as I believe they are not in them and the field references in the templates (clientraw etc)..

So far I resisted adding new fields into the archive DB but I might end up doing that to avoid situations like yours..  The WD project will slow a little as I had a few weeks off while I was switching jobs which has sadly finished but the core is pretty much done just a few more stats to do which I will do in the next week or two..

If you can hold for a week or two I think we would be in a better position but if you feel like playing please do..

John Canfield

unread,
May 27, 2013, 6:57:59 PM5/27/13
to weewx...@googlegroups.com
Greg - since I have 52 weeks off every year, I will gladly commit to expending the energy while waiting on when you have time for inspirational hacking :).

John

Oz Greg

unread,
May 28, 2013, 12:05:14 AM5/28/13
to weewx...@googlegroups.com
John,

The more the merrier if you want to do some reviewing/coding/documentation I can add you into the bitbucket site :) 

John Canfield

unread,
May 28, 2013, 6:55:29 PM5/28/13
to weewx...@googlegroups.com
Thanks Greg - I must have stepped out of line when God passed out the coding talent ;-) I have done a little coding, but it was an ugly experience.

John

Oz Greg

unread,
May 28, 2013, 11:55:39 PM5/28/13
to weewx...@googlegroups.com
John,

How is your documentation and testing experience then :)

John Canfield

unread,
May 31, 2013, 5:36:27 PM5/31/13
to weewx...@googlegroups.com
Greg - I'm okay with the written word and I'm usually successful at breaking stuff  ;-)  I'm super busy until later June - we're getting ready to leave for the summer (headed for cooler temps) so I'm completely focused on that activity.  I wish I had a test setup, there are a few locals that depend on my wx reporting (we're fairly rural.)

On another note, I think your project is Flash based?  Does it play well on Macs and iOS?

John

Marco Bakker

unread,
Jun 1, 2013, 10:21:06 AM6/1/13
to weewx...@googlegroups.com
Hi,

testing  on a rasp, with simulator. I get in /var/log/messages :
Jun  1 16:15:15 raspberrypi weewx[2258]: Archive: added archive record 2013-06-01 16:15:00 CEST (1370096100)
Jun  1 16:15:16 raspberrypi weewx[2258]: filegenerator: generated 1 'SummaryByMonth' files in 0.38 seconds
Jun  1 16:15:18 raspberrypi weewx[2258]: filegenerator: generated 1 'SummaryByYear' files in 2.01 seconds
Jun  1 16:15:20 raspberrypi weewx[2258]: filegenerator: generated 12 'toDate' files in 2.41 seconds
Jun  1 16:15:23 raspberrypi weewx[2258]: genimages: Generated 11 images in 2.46 seconds
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****  Traceback (most recent call last):
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****      obj.start()
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****      self.run()
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****      self.generateToDate(self.gen_ts)
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 236, in generateToDate
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****      searchList = self.getCommonSearchList(archivedb, statsdb, timespan) + self.getToDateSearchList(archivedb, statsdb, timespan)
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****    File "/usr/share/weewx/user/wdtags.py", line 74, in getToDateSearchList
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****      time_vt = (time_valuetuple[0][2], time_valuetuple[1], time_valuetuple[2])
Jun  1 16:15:23 raspberrypi weewx[2258]:         ****  IndexError: list index out of range

Is it because I'm doing something wrong, or ......
How can we solve this ?

Greetings, and thx for the good work !


Op maandag 27 mei 2013 13:54:03 UTC+2 schreef Oz Greg het volgende:

Thomas Keffer

unread,
Jun 1, 2013, 10:41:31 AM6/1/13
to weewx-user
I have no idea. I do not recognize the code. Is this something you wrote? 

-tk

Marco Bakker

unread,
Jun 1, 2013, 10:48:38 AM6/1/13
to weewx...@googlegroups.com
no, Oz did !

Op zaterdag 1 juni 2013 16:41:31 UTC+2 schreef Tom Keffer het volgende:

Oz Greg

unread,
Jun 1, 2013, 8:50:44 PM6/1/13
to weewx...@googlegroups.com
Hmmm that is the getting the last 24 hours code not sure why that would be getting a out of range index..  Gary and I have tweaked that code in the development branch and I intend to do another point release in the next 24 hours so can you hold for 24 hours and try again?

Marco Bakker

unread,
Jun 2, 2013, 11:05:13 AM6/2/13
to weewx...@googlegroups.com
Oz,
Thanks for your quick reaction,

I think you're assuming that there is enough data when starting with the export to WD. In my case the weewx-generator was started yesterday.
There was not enough data (less than 24 hours).

I do not get these error anymore, but now i get a another one ...

Jun  2 17:00:16 raspberrypi weewx[2243]: Archive: added archive record 2013-06-02 17:00:00 CEST (1370185200)
Jun  2 17:00:17 raspberrypi weewx[2243]: filegenerator: generated 1 'SummaryByMonth' files in 0.44 seconds
Jun  2 17:00:19 raspberrypi weewx[2243]: filegenerator: generated 1 'SummaryByYear' files in 2.08 seconds
Jun  2 17:00:28 raspberrypi weewx[2243]: filegenerator: generated 14 'toDate' files in 9.51 seconds
Jun  2 17:00:46 raspberrypi weewx[2243]: genimages: Generated 22 images in 17.23 seconds
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****  Traceback (most recent call last):
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****      obj.start()
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****      self.run()
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****      self.generateToDate(self.gen_ts)
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****      print >> _file, text
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****      rc = getattr(self, mainMethName)()
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****    File "_etc_weewx_skins_WD_clientraw_txt_tmpl.py", line 96, in respond
Jun  2 17:00:47 raspberrypi weewx[2243]:         ****  TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'

Any idea ?

Greetings !


Op zondag 2 juni 2013 02:50:44 UTC+2 schreef Oz Greg het volgende:

Oz Greg

unread,
Jun 2, 2013, 6:20:12 PM6/2/13
to weewx...@googlegroups.com
I suspected that was the issue and it appears you are still getting caught again by the lack of data again..  I am slowly going back and getting rid of the floats for this very reason but it will take a few days until I can get rid of them all..   

$("%.1f" % $hour_rain_value[0][$i]) #slurp (is a good example)

Hopefully once I have gotten rid of them all Python/Cheetah will better be able to support the lack of data until the DB's get populated with the historical data which is a requirement for WD.

Sorry :(

Oz Greg

unread,
Jun 3, 2013, 6:13:24 PM6/3/13
to weewx...@googlegroups.com
After dissecting this issue yesterday I will also have to add some additional IF's around the Solar and UV calculations..  

vds

unread,
Jun 3, 2013, 9:27:27 PM6/3/13
to weewx...@googlegroups.com
On Monday, May 27, 2013 4:54:03 AM UTC-7, Oz Greg wrote:
New project location (including yes downloads) https://bitbucket.org/ozgreg/weewx-wd


One thing you might want to check is for hardcoded pathnames.  I grabbed a git clone this afternoon and things blew up immediately trying to read /home/pi/forecast.txt which isn't a pathname valid on my system.  Maybe wrap it in a try/except block plus make whatever pathname(s) you want configurable ?


 

Oz Greg

unread,
Jun 3, 2013, 9:46:03 PM6/3/13
to weewx...@googlegroups.com
Already on the radar -> https://bitbucket.org/ozgreg/weewx-wd/issue/4/better-control-of-forecasts

and yes I am in the process of moving these kind of control to the skin.conf for this very reason.. 

vds

unread,
Jun 4, 2013, 8:38:38 PM6/4/13
to weewx...@googlegroups.com

Mine's been doing this for 24 hours now

Jun  4 17:35:22 localhost weewx[2754]: genimages: Generated 11 images in 2.34 seconds
Jun  4 17:35:25 localhost weewx[2754]:         ****  Traceback (most recent call last):
Jun  4 17:35:25 localhost weewx[2754]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 130, in run
Jun  4 17:35:25 localhost weewx[2754]:         ****      obj.start()
Jun  4 17:35:25 localhost weewx[2754]:         ****    File "/home/weewx/bin/weewx/reportengine.py", line 288, in start
Jun  4 17:35:25 localhost weewx[2754]:         ****      self.run()
Jun  4 17:35:25 localhost weewx[2754]:         ****    File "/home/weewx/bin/weewx/filegenerator.py", line 44, in run
Jun  4 17:35:25 localhost weewx[2754]:         ****      self.generateToDate(self.gen_ts)
Jun  4 17:35:25 localhost weewx[2754]:         ****    File "/home/weewx/bin/weewx/filegenerator.py", line 253, in generateToDate
Jun  4 17:35:25 localhost weewx[2754]:         ****      print >> _file, text
Jun  4 17:35:25 localhost weewx[2754]:         ****    File "/usr/lib/pymodules/python2.6/Cheetah/Template.py", line 1005, in __str__
Jun  4 17:35:25 localhost weewx[2754]:         ****      rc = getattr(self, mainMethName)()
Jun  4 17:35:25 localhost weewx[2754]:         ****    File "_home_weewx_skins_WD_clientrawextra_txt_tmpl.py", line 1312, in respond
Jun  4 17:35:25 localhost weewx[2754]:         ****  TypeError: a float is required


Oz Greg

unread,
Jun 4, 2013, 9:09:43 PM6/4/13
to weewx...@googlegroups.com
It needs something like this around the UV and Solar outputs in the templates but I've not had time to update the templates to incorporate this change so unless you have those mentioned sensors the outputs will crash.. :(

#if $Extras.UV_Inst_Flag = u1
#then
#set $hour_solar = round($hour_solar_value[0][$i],0)
$hour_solar #slurp
#else
0 #slurp
#endif

or 

#try
#set $hour_solar = round($hour_solar_value[0][$i],0) 
$hour_solar #slurp 
#except ValueError
0 #slurp
#end try

Oz Greg

unread,
Jun 5, 2013, 8:10:11 AM6/5/13
to weewx...@googlegroups.com
Pushed the template changes for #try and External Forecast File, hopefully this should help eliminate any errors for everyone without Solar and UV Sensors..

Please remember to edit the WD Skin skin.conf file to suit your requirements.. 

Marco Bakker

unread,
Jun 11, 2013, 5:30:44 AM6/11/13
to weewx...@googlegroups.com
In skin.conf :
[[Forecast]]
# Forecast File
# Leave Blank for No (External) Forecast File
# Forecast_File_Location = /home/pi/forecast.txt
        Forecast_File_Location =

Error :
Jun 11 11:25:33 raspberrypi weewx[2245]: reportengine: ftp'd 30 files in 3.52 seconds
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****  Traceback (most recent call last):
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****      obj.start()
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****      self.run()
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****      self.generateToDate(self.gen_ts)
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 236, in generateToDate
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****      searchList = self.getCommonSearchList(archivedb, statsdb, timespan) + self.getToDateSearchList(archivedb, statsdb, timespan)
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****    File "/usr/share/weewx/user/wdtags.py", line 1439, in getToDateSearchList
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****      'forecast_icon': forecast_icon}]
Jun 11 11:25:35 raspberrypi weewx[2245]:         ****  UnboundLocalError: local variable 'forecast_icon' referenced before assignment

How to solve this ?
Greetings,
Marco


Op woensdag 5 juni 2013 14:10:11 UTC+2 schreef Oz Greg het volgende:

Oz Greg

unread,
Jun 11, 2013, 8:31:52 AM6/11/13
to weewx...@googlegroups.com
Sorry I forgot to extend the IF part to also include the icon..

Pretty busy now but should be able to resolve this for you in a few days..

Oz Greg

unread,
Jun 11, 2013, 8:33:00 AM6/11/13
to weewx...@googlegroups.com

George D. Nincehelser

unread,
Jun 14, 2013, 1:46:08 PM6/14/13
to weewx...@googlegroups.com
I'm trying to get this running but I must not have put the files in the right place.  I've tried /usr/share/weewx and /usr/share/weewx/weewx.  I installed weewx with the deb package if that makes any difference.

I keep getting the these module errors.  Any ideas?

Jun 14 12:32:07 raspberrypi weewx[7065]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 864, in main
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****      engine = EngineClass(config_dict)
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 70, in __init__
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****      self.loadServices(config_dict)
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****    File "/usr/share/weewx/weewx/wxengine.py", line 124, in loadServices
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****      self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 701, in _get_object
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****      mod = __import__(module)
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****  ImportError: No module named wd
Jun 14 12:32:07 raspberrypi weewx[7065]:     ****  Exiting.

gjr80

unread,
Jun 14, 2013, 4:11:33 PM6/14/13
to weewx...@googlegroups.com
George,
wd.py and wdtags.py should placed in the /usr/share/weewx/user folder. The template files and skin.conf should be placed in their own folder under /etc/weewx/skins.

regards,
Gary

George D. Nincehelser

unread,
Jun 14, 2013, 5:00:25 PM6/14/13
to weewx...@googlegroups.com
I'm still confused.  Did I download the wrong thing?

The .zip file under "downloads" doesn't have wd.py or wdtags.py 

I take it I should be downloading the files under source?  (Master or Develop?)

Where then do the contents of the .zip file fit in?

Thanks

George D. Nincehelser

unread,
Jun 14, 2013, 6:11:52 PM6/14/13
to weewx...@googlegroups.com
I think I may have straightened myself out.  I found another zip file titled ozgreg*.zip that seems to have the right files.

However, I now get this error:

Jun 14 17:08:38 raspberrypi weewx[7717]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****  local variable 'tenmin_dew' referenced before assignment
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****  Traceback (most recent call last):
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****      obj.start()
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****      self.run()
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****      self.generateToDate(self.gen_ts)
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 236, in generateToDate
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****      searchList = self.getCommonSearchList(archivedb, statsdb, timespan) + self.getToDateSearchList(archivedb, statsdb, timespan)
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****    File "/usr/share/weewx/user/wdtags.py", line 881, in getToDateSearchList
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****      tenmin_dew_vt = (tenmin_dew, 'degree_C', 'group_temperature')
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****  UnboundLocalError: local variable 'tenmin_dew' referenced before assignment
Jun 14 17:08:38 raspberrypi weewx[7717]:         ****  Generator terminated...

gjr80

unread,
Jun 14, 2013, 7:01:18 PM6/14/13
to weewx...@googlegroups.com
George,
You should find wd.py and wdtags.py in the zip under the folder /bin/user. I just downloaded the zip from bitbucket and they were there. Would suggest that you use the latest zip (not sure from your post if that is what you have) as it has been a bit of a moving feast recently in terms of straightening out bugs. If the issue with tenmin_dew remains you may need to wait until Oz Greg replies as he authored and understands that part of the code far better than I. You may also want to pull testtags.php.tmpl from 'develop', it was updated on 12 Jun and I don't believe Greg has had a chance to roll it into the zip as yet.
Gary

George D. Nincehelser

unread,
Jun 14, 2013, 9:50:06 PM6/14/13
to weewx...@googlegroups.com
I got the tenmin_dew problem fixed.  It looks like it wasn't being set to zero like all the other values, so I just inserted that line

                try:
                                tenmin_temp = tenmin_rec['outTemp']
                                tenmin_baro = tenmin_rec['barometer']
                                tenmin_wind = tenmin_rec['windSpeed']
                                tenmin_gust = tenmin_rec['windGust']
                                tenmin_dir = tenmin_rec['windDir']
                                tenmin_humidity = tenmin_rec['outHumidity']
                                tenmin_dew = tenmin_rec['dewpoint']
                                tenmin_rain = tenmin_rec['rain']
                                tenmin_solar = tenmin_rec['radiation']
                                tenmin_uv = tenmin_rec['UV']
                except TypeError:
                                tenmin_temp = 0
                                tenmin_baro = 0
                                tenmin_wind = 0
                                tenmin_gust = 0
                                tenmin_dir = 0
                                tenmin_humidity = 0
                                tenmin_dew = 0       <-------------------------  added this
                                tenmin_rain = 0
                                tenmin_solar = 0


Now I've got a different bug about /home/pi/forecast.txt not existing.

 
 Jun 14 20:39:39 raspberrypi weewx[2693]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****  [Errno 2] No such file or directory: '/home/pi/forecast.txt'
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****  Traceback (most recent call last):
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****      obj.start()
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****      self.run()
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****      self.generateToDate(self.gen_ts)
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 236, in generateToDate
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****      searchList = self.getCommonSearchList(archivedb, statsdb, timespan) + self.getToDateSearchList(archivedb, statsdb, timespan)
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****    File "/usr/share/weewx/user/wdtags.py", line 1106, in getToDateSearchList
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****      f = open(forecastfile, "r")
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****  IOError: [Errno 2] No such file or directory: '/home/pi/forecast.txt'
Jun 14 20:39:39 raspberrypi weewx[2693]:         ****  Generator terminated...

gjr80

unread,
Jun 14, 2013, 10:07:13 PM6/14/13
to weewx...@googlegroups.com
forecast.txt error is to do with a forecast script that Greg runs. He has put some code in skin.conf that is supposed to turn it off for those of us that don't have the script. You may need to look at that setting and turn it off, if the code is not working then comment it out though you will have to modify wdtags.py for that. You may also get some errors from the testtags.php.tmpl - not sure if it gracefully handles the associated (forecast) tags not being there. If so best bet is to comment them out.

Gary

George D. Nincehelser

unread,
Jun 14, 2013, 10:09:26 PM6/14/13
to weewx...@googlegroups.com
Got the forecast stuff sorted out.

Now I've got this and I'm stumped.

Jun 14 20:59:13 raspberrypi weewx[2768]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****  a float is required
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****  Traceback (most recent call last):
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****      obj.start()
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****      self.run()
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****      self.generateToDate(self.gen_ts)
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****      print >> _file, text
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****      rc = getattr(self, mainMethName)()
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****    File "_etc_weewx_skins_WD_clientrawextra_txt_tmpl.py", line 1318, in respond
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****  TypeError: a float is required
Jun 14 20:59:13 raspberrypi weewx[2768]:         ****  Generator terminated...

Gary Roderick

unread,
Jun 14, 2013, 11:01:48 PM6/14/13
to weewx...@googlegroups.com

George,  suspect this is due to some. 'try'  statements in clientraw.txt.  The associated 'except' statements should be except TypeError not except ValueError.  From memory there is only a handful.  If this is not the issue then I will have to have another look in a few hours when I am home in front of the pc. Sorry.
Gary

Oz Greg

unread,
Jun 14, 2013, 11:46:09 PM6/14/13
to weewx...@googlegroups.com
Just pushed through a change in the GIT now that changes the Try statements

Will fix up the Forecast Icon Next :)

FYI you can always download the latest source by clicking on the download link from the front page..

Oz Greg

unread,
Jun 15, 2013, 12:11:10 AM6/15/13
to weewx...@googlegroups.com
Completed Commit for Forecast Icon Issue..  Hopefully code should now be pretty robust :)

George D. Nincehelser

unread,
Jun 15, 2013, 12:21:47 AM6/15/13
to weewx...@googlegroups.com
i haven't tried the new code yet, but I'm finding a lot of sometimeinterval_dew errors.  For some reason most everything else gets set to zero except the dew values.


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

George D. Nincehelser

unread,
Jun 15, 2013, 12:24:31 AM6/15/13
to weewx...@googlegroups.com
Now it looks like I'm getting the same sort of errors with sometimeinterval_uv.

Jun 14 23:22:37 raspberrypi weewx[3123]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****  local variable 'fortyfivemin_uv' referenced before assignment
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****  Traceback (most recent call last):
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****      obj.start()
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****      self.run()
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****      self.generateToDate(self.gen_ts)
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 236, in generateToDate
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****      searchList = self.getCommonSearchList(archivedb, statsdb, timespan) + self.getToDateSearchList(archivedb, statsdb, timespan)
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****    File "/usr/share/weewx/user/wdtags.py", line 964, in getToDateSearchList
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****      fortyfivemin_uv_vt = (fortyfivemin_uv, 'watt_per_meter_squared', 'group_radiation')
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****  UnboundLocalError: local variable 'fortyfivemin_uv' referenced before assignment
Jun 14 23:22:37 raspberrypi weewx[3123]:         ****  Generator terminated...




Oz Greg

unread,
Jun 15, 2013, 12:26:25 AM6/15/13
to weewx...@googlegroups.com
Hmm that is interesting because clientraw DEW measurements utilise either $current or $month reporting tags which are a standard weewx measurement and thus they should be right.. (WD adds hour in day and minute in hour measurements only)

When you get an error could you share it?

Thanks

George D. Nincehelser

unread,
Jun 15, 2013, 1:05:42 AM6/15/13
to weewx...@googlegroups.com
I've rolled back to your most recent update.

Here are the errors I'm getting now

Jun 14 23:59:44 raspberrypi weewx[3222]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****  list index out of range
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****  Traceback (most recent call last):
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****      obj.start()
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****      self.run()
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****      self.generateToDate(self.gen_ts)
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****      print >> _file, text
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****      rc = getattr(self, mainMethName)()
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****    File "_etc_weewx_skins_WD_clientrawhour_txt_tmpl.py", line 124, in respond
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****  IndexError: list index out of range
Jun 14 23:59:44 raspberrypi weewx[3222]:         ****  Generator terminated...
Jun 15 00:00:04 raspberrypi weewx[3222]: reportengine: ftp'd 25 files in 19.92 seconds
Jun 15 00:00:17 raspberrypi weewx[3222]: Archive: added archive record 2013-06-15 00:00:00 CDT (1371272400)
Jun 15 00:00:21 raspberrypi weewx[3222]: restful: Published record 2013-06-15 00:00:00 CDT (1371272400) to Wunderground station KNEPERU3
Jun 15 00:00:22 raspberrypi weewx[3222]: filegenerator: generated 1 'SummaryByMonth' files in 0.71 seconds
Jun 15 00:00:24 raspberrypi weewx[3222]: filegenerator: generated 1 'SummaryByYear' files in 2.15 seconds
Jun 15 00:00:28 raspberrypi weewx[3222]: filegenerator: generated 12 'toDate' files in 4.07 seconds
Jun 15 00:01:04 raspberrypi weewx[3222]: genimages: Generated 45 images in 35.79 seconds
Jun 15 00:01:06 raspberrypi weewx[3222]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****  local variable 'seventyfivemin_dew' referenced before assignment
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****  Traceback (most recent call last):
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****      obj.start()
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****      self.run()
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****      self.generateToDate(self.gen_ts)
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 236, in generateToDate
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****      searchList = self.getCommonSearchList(archivedb, statsdb, timespan) + self.getToDateSearchList(archivedb, statsdb, timespan)
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****    File "/usr/share/weewx/user/wdtags.py", line 904, in getToDateSearchList
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****      seventyfivemin_dew_vt = (seventyfivemin_dew, 'degree_C', 'group_temperature')
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****  UnboundLocalError: local variable 'seventyfivemin_dew' referenced before assignment
Jun 15 00:01:06 raspberrypi weewx[3222]:         ****  Generator terminated...

Oz Greg

unread,
Jun 15, 2013, 2:42:22 AM6/15/13
to weewx...@googlegroups.com
Ahh missing a few variables in the try..  Found them and committed the change..

Please grab the latest version.. :)

George D. Nincehelser

unread,
Jun 15, 2013, 3:16:57 AM6/15/13
to weewx...@googlegroups.com
It's looking better, but another error....

Jun 15 02:13:48 raspberrypi weewx[3445]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****  unsupported operand type(s) for *: 'float' and 'NoneType'
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****  Traceback (most recent call last):
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****      obj.start()
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****      self.run()
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****      self.generateToDate(self.gen_ts)
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****      print >> _file, text
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****      rc = getattr(self, mainMethName)()
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****    File "_etc_weewx_skins_WD_testtags_php_tmpl.py", line 319, in respond
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****  TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
Jun 15 02:13:48 raspberrypi weewx[3445]:         ****  Generator terminated...

Oz Greg

unread,
Jun 15, 2013, 3:34:52 AM6/15/13
to weewx...@googlegroups.com
Hmm hard to say what is causing that..  

I have thrown in some more try's around some of the floats..

Lets see if that works..  The changes have been committed so grab the latest.. :)

George D. Nincehelser

unread,
Jun 15, 2013, 3:50:09 AM6/15/13
to weewx...@googlegroups.com
A couple of errors in this one...

Jun 15 02:43:48 raspberrypi weewx[3523]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****  unsupported operand type(s) for *: 'float' and 'NoneType'
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****  Traceback (most recent call last):
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****      obj.start()
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****      self.run()
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****      self.generateToDate(self.gen_ts)
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****      print >> _file, text
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __s                                                    tr__
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****      rc = getattr(self, mainMethName)()
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****    File "_etc_weewx_skins_WD_testtags_php_tmpl.py", line 328, in respond
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****  TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
Jun 15 02:43:48 raspberrypi weewx[3523]:         ****  Generator terminated...
Jun 15 02:44:08 raspberrypi weewx[3523]: reportengine: ftp'd 25 files in 19.91 seconds
Jun 15 02:44:18 raspberrypi weewx[3523]: Archive: added archive record 2013-06-15 02:44:00 CDT (1371282240)
Jun 15 02:44:22 raspberrypi weewx[3523]: restful: Published record 2013-06-15 02:44:00 CDT (1371282240) to Wunderground station KNEPERU3
Jun 15 02:44:23 raspberrypi weewx[3523]: filegenerator: generated 1 'SummaryByMonth' files in 0.78 seconds
Jun 15 02:44:25 raspberrypi weewx[3523]: filegenerator: generated 1 'SummaryByYear' files in 2.19 seconds
Jun 15 02:44:29 raspberrypi weewx[3523]: filegenerator: generated 12 'toDate' files in 4.13 seconds
Jun 15 02:44:35 raspberrypi weewx[3523]: genimages: Generated 11 images in 5.85 seconds
Jun 15 02:44:38 raspberrypi weewx[3523]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****  local variable 'fivemin_dew' referenced before assignment
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****  Traceback (most recent call last):
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****      obj.start()
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****      self.run()
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****      self.generateToDate(self.gen_ts)
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 236, in generateToDate
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****      searchList = self.getCommonSearchList(archivedb, statsdb, timespan) + self.getToDateSearchList(archivedb, statsdb, timespan)
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****    File "/usr/share/weewx/user/wdtags.py", line 869, in getToDateSearchList
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****      fivemin_dew_vt = (fivemin_dew, 'degree_C', 'group_temperature')
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****  UnboundLocalError: local variable 'fivemin_dew' referenced before assignment
Jun 15 02:44:38 raspberrypi weewx[3523]:         ****  Generator terminated...

Oz Greg

unread,
Jun 15, 2013, 3:59:02 AM6/15/13
to weewx...@googlegroups.com
Looks like  'fivemin_dew' lacked a = 0 assignment..  

Added and committed change.. 

George D. Nincehelser

unread,
Jun 15, 2013, 4:09:09 AM6/15/13
to weewx...@googlegroups.com
Jun 15 03:07:51 raspberrypi weewx[3590]: reportengine: Caught unrecoverable exception in generator user.wdtags.WDFileGenerator
Jun 15 03:07:51 raspberrypi weewx[3590]:         ****  unsupported operand type(s) for *: 'float' and 'NoneType'
Jun 15 03:07:51 raspberrypi weewx[3590]:         ****  Traceback (most recent call last):
Jun 15 03:07:51 raspberrypi weewx[3590]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 130, in run
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****      obj.start()
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 288, in start
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****      self.run()
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 44, in run
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****      self.generateToDate(self.gen_ts)
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****    File "/usr/share/weewx/weewx/filegenerator.py", line 253, in generateToDate
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****      print >> _file, text
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****    File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****      rc = getattr(self, mainMethName)()
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****    File "_etc_weewx_skins_WD_testtags_php_tmpl.py", line 328, in respond
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****  TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
Jun 15 03:07:52 raspberrypi weewx[3590]:         ****  Generator terminated...

Oz Greg

unread,
Jun 15, 2013, 4:12:55 AM6/15/13
to weewx...@googlegroups.com
What is your station type??  

George D. Nincehelser

unread,
Jun 15, 2013, 4:14:48 AM6/15/13
to weewx...@googlegroups.com
Simulator.  It's a modified simulator for the AcuLink bridge.

Thomas Keffer

unread,
Jun 15, 2013, 9:42:55 AM6/15/13
to weewx-user
I am delighted that you two are getting so deep into this!

Just one request: could you move the discussion over to weewx-development? 

-tk


--
You received this message because you are subscribed to the Google Groups "Weewx user's group" 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/groups/opt_out.
 
 



--
Tom Keffer
kef...@threefools.org
+1 541-386-8891 (h)
+1 541-490-9507 (c)
Skype: tkeffer

Oz Greg

unread,
Jun 15, 2013, 10:24:00 PM6/15/13
to weewx...@googlegroups.com
As Tom as already suggested -> This Thread is closed please post over at https://groups.google.com/forum/?fromgroups=#!forum/weewx-user on the thread Titled WD (Clientraw) Skin

Thanks..
Reply all
Reply to author
Forward
0 new messages