To graph a specific time span

131 views
Skip to first unread message

Jose

unread,
Jun 13, 2020, 7:20:15 AM6/13/20
to weewx-user
hi

I am trying to graph a specific time spam. My graphs.conf looks like this:


[seguimientoespecial]
     button_text
= "SEGUIMIENTO ESPECIAL"
     show_button
= true
     time_length
= timespan_specific
    timespan_start
= 1591998600
    timespan_stop
= 1591998900
    aggregate_type
= max
    aggregate_interval
= 86400 # 1 day
    gapsize
= 86400000 # 1 day in milliseconds
    title
= "Seguimiento especial"


   
[[chart1]]
       title
= Temperatura
           
[[[outTemp_min]]]
            name
= Min Temperatura
            observation_type
= outTemp
            aggregate_type
= min
            color
= "#268bd2"
       
[[[outTemp_avg]]]
            name
= Media de las Temp medias
           observation_type
= outTemp
            aggregate_type
= avg
            color
= orange
       
[[[outTemp]]]
            zIndex
= 1
            observation_type
= outTemp
            aggregate_type
= max
            color
= red



and this is the log. I must say that I have no problem with the rest of the charts only when I try to get the time interval chart.



Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'user.belchertown.HighchartsJsonGenerator'
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****  Error trying to use database binding wx_binding to graph observation outTemp. Error was: an integer is required (got type str).
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 1825, in get_observation_data
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      (time_start_vt, time_stop_vt, obs_vt) = archive.getSqlVectors(TimeSpan(start_ts, end_ts), obs_lookup, aggregate_type, aggregate_interval)
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/manager.py", line 452, in getSqlVectors
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      aggregate_type, aggregate_interval)
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/xtypes.py", line 86, in get_series
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      aggregate_interval)
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/xtypes.py", line 138, in get_series
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      for stamp in weeutil.weeutil.intervalgen(startstamp, stopstamp, aggregate_interval):
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weeutil/weeutil.py", line 311, in intervalgen
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      dt1 = datetime.datetime.fromtimestamp(start_ts)
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****  TypeError: an integer is required (got type str)
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****  During handling of the above exception, another exception occurred:
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      obj.start()
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 280, in start
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      self.run()
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 1374, in run
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      series_data = self.get_observation_data(binding, archive, observation_type, minstamp, maxstamp, aggregate_type, aggregate_interval, time_length, xAxis_groupby, xAxis_categories, mirrored_value, weatherRange_obs_lookup)
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 1827, in get_observation_data
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****      raise Warning( "Error trying to use database binding %s to graph observation %s. Error was: %s." % (binding, obs_lookup, e) )
Jun 13 13:00:35 raspberrypi weewx[2716] ERROR weewx.reportengine:         ****  Warning: Error trying to use database binding wx_binding to graph observation outTemp. Error was: an integer is required (got type str).



Pat

unread,
Jun 13, 2020, 8:30:35 AM6/13/20
to weewx-user
I was able to replicate this on the latest development version of the skin. I recently made changes to timespan_specific - Which version of the skin are you using?

Pat

unread,
Jun 13, 2020, 8:41:52 AM6/13/20
to weewx-user
I've fixed it, and I think this issue exists in 1.1 too. 

Let me know which version of the skin you're using and I'll attach a patch here for you to try.
HiSDbjniJHo1.jpg

Jose

unread,
Jun 13, 2020, 9:43:59 AM6/13/20
to weewx-user
Belchertown v1.1 
WeeWX v4.1.1

Pat

unread,
Jun 13, 2020, 9:54:09 AM6/13/20
to weewx-user
Replace your bin/user/belchertown.py with this one and restart weewx
belchertown.zip

Jose

unread,
Jun 13, 2020, 11:18:51 AM6/13/20
to weewx-user

works perfectly, thanks Pat
Reply all
Reply to author
Forward
0 new messages