I've found my problem.... Thank you Vince ! The problems were in 2 extension file : lastrain.py and lastfrost.py (date of the last rain and frost and duration without rain and frost).
*Before :* # Wrap our ts in a ValueHelper last_rain_vt = (last_rain_ts, 'unix_epoch', 'group_time') last_rain_vh = ValueHelper(last_rain_vt, formatter=self.generator.formatter, converter=self.generator.converter) # next idea stolen with thanks from weewx station.py # note this is delta time from 'now' not the last weewx db time # - weewx used time.time() but weewx-wd suggests timespan.stop() delta_time = time.time() - last_rain_ts if last_rain_ts else None # Wrap our ts in a ValueHelper delta_time_vt = (delta_time, 'second', 'group_deltatime') delta_time_vh = ValueHelper(delta_time_vt, formatter=self.generator.formatter, converter=self.generator.converter) *AFTER :* # Wrap our ts in a ValueHelper last_rain_vt = (last_rain_ts, 'unix_epoch', 'group_time') last_rain_vh = ValueHelper(last_rain_vt, formatter=self.generator.formatter, converter=self.generator.converter) # next idea stolen with thanks from weewx station.py # note this is delta time from 'now' not the last weewx db time # - weewx used time.time() but weewx-wd suggests timespan.stop() delta_time = time.time() - last_rain_ts if last_rain_ts else None # Wrap our ts in a ValueHelper delta_time_vt = (delta_time, 'second', 'group_deltatime') delta_time_vh = ValueHelper(delta_time_vt, *context='long_delta',* formatter=self.generator.formatter, converter=self.generator.converter) And now... ALL IS OK !! THANK-YOU VERY MUCH VINCE !!!!! ::-)) Le lundi 7 février 2022 à 20:30:39 UTC+1, Remy Lavabre a écrit : > Thank you for your answer Vincent. > Could you indicate me which python file exactly to add the New value > context='long_delta ? And where I must add this New value in the py file ? > I have seen the article you indicate me but i did not understand what to > do... > Than you . Cordialy vincent > Le lundi 7 février 2022 à 18:36:06 UTC+1, vince a écrit : > >> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >> Ignoring template /etc/weewx/skins/Seasons2/index.html.tmpl >> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >> Reason: %x format: an integer is required, not dict >> >> I saw this when I upgraded my system yesterday. >> >> The problem was my ancient custom extension broke due to group_deltatime >> API change in 4.6.0 - the fix is documented in >> https://weewx.com/docs/upgrading.htm#API_changes - all I did was add >> context='long_delta' to my python extension and restarted weewx and all was >> good again. >> >> On Monday, February 7, 2022 at 9:22:21 AM UTC-8 remy.l...@gmail.com >> wrote: >> >>> With the previous version 4.51, no problem since 1 year. >>> Since 4.6.0 the records are good on the database, but I have errors in >>> the log file and the value in the "current conditions" of the skin Seasons >>> don't move. >>> They remain frozen at the last known value with Weewx 4.5.1. In fact, >>> the Season skin no longer works but the data is correctly saved in the >>> database. >>> Attached is the log file. I can't get my skin season to start again! :-(( >>> HELP ! >>> >>> Feb 7 17:55:16 RPiMeteo weewx[29371] INFO weewx.restx: >>> Wunderground-PWS: Published record 2022-02-07 17:55:00 CET (1644252900) >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: >>> Evaluation of template /etc/weewx/skins/Seasons2/index.html.tmpl failed >>> with exception '<class 'TypeError'>' >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> Ignoring template /etc/weewx/skins/Seasons2/index.html.tmpl >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> Reason: %x format: an integer is required, not dict >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> Traceback (most recent call last): >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/share/weewx/weewx/cheetahgenerator.py", line 344, in generate >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> unicode_string = compiled_template.respond() >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "_etc_weewx_skins_Seasons2_index_html_tmpl.py", line 259, in respond >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1708, in >>> _handleCheetahInclude >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> self._CHEETAH__cheetahIncludes[_includeID].respond(trans) >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "_etc_weewx_skins_Seasons2_current_inc.py", line 714, in respond >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/share/weewx/weewx/cheetahgenerator.py", line 816, in filter >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> filtered = six.text_type(val) >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/share/weewx/weewx/units.py", line 1005, in __str__ >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> s = self.toString() >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/share/weewx/weewx/units.py", line 998, in toString >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> s = self.formatter.toString(self.value_t, self.context, >>> addLabel=addLabel, >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/share/weewx/weewx/units.py", line 688, in toString >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> s = self._to_string(val_t, context, addLabel, useThisFormat, >>> None_string, localize) >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/share/weewx/weewx/units.py", line 748, in _to_string >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> val_str = self.delta_secs_to_string(val_t[0], format_string) >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/share/weewx/weewx/units.py", line 796, in delta_secs_to_string >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> ans = locale.format_string(label_format, etime_dict) >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/lib/python3.9/locale.py", line 223, in format_string >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> new_val.append(_format(perc.group(), val, grouping, monetary)) >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> File "/usr/lib/python3.9/locale.py", line 187, in _format >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> formatted = percent % value >>> Feb 7 17:55:17 RPiMeteo weewx[29371] ERROR weewx.cheetahgenerator: **** >>> TypeError: %x format: an integer is required, not dict >>> Feb 7 17:55:17 RPiMeteo weewx[29371] INFO weewx.restx: WeatherCloud: >>> Published record 2022-02-07 17:55:00 CET (1644252900) >>> >> -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b567f1e1-d8f8-46ba-96e7-51fe1c215b38n%40googlegroups.com.