SQLite. I was wondering that, but as "0" <> 0, selecting windGust, count(*) 
should bring back separate rows for each.

On Monday, 23 December 2024 at 22:49:54 UTC Tom Keffer wrote:

> I would guess that one of the fields in your database that you think holds 
> a number, actually holds a string. It could be a string for value zero 
> ('0'), instead of the actual value zero (0).
>
> The error occurred on a line that is doing queries in the main archive 
> table (not the daily summaries) using columns 'windDir' or 'windGustDir'. 
>
> One more thing: what kind of database? Sqlite?
>
>
>
> On Mon, Dec 23, 2024 at 10:55 AM Auchtermuchty Weather <shunr...@gmail.com> 
> wrote:
>
>> Sorry truncated the error report. I used cut to remove the stuff at the 
>> start of each line and put the output into a file, then used 'set number' 
>> in my text editor to make sure I pasted all the lines.,
>>
>>       1 Caught unrecoverable exception in generator 
>> 'weewx.imagegenerator.ImageGenerator'
>>       2         ****  unsupported operand type(s) for -: 'float' and 'str'
>>       3         ****  Traceback (most recent call last):
>>       4         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 109, in get_series
>>       5         ****      return xtype.get_series(obs_type, timespan, 
>> db_manager, aggregate_type,
>>       6         ****             
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>       7         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 1040, in get_series
>>       8         ****      return ArchiveTable.get_series(obs_type, 
>> timespan, db_manager, aggregate_type,
>>       9         ****             
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>      10         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 210, in get_series
>>      11         ****      agg_vt = get_aggregate(obs_type, stamp, 
>> do_aggregate, db_manager,
>>      12         ****               
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>      13         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 136, in get_aggregate
>>      14         ****      return xtype.get_aggregate(obs_type, timespan, 
>> aggregate_type, db_manager,
>>      15         ****             
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>      16         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 1168, in get_aggregate
>>      17         ****      xsum += mag * math.cos(math.radians(90.0 - 
>> direction))
>>      18         ****                                         
>>  ~~~~~^~~~~~~~~~~
>>      19         ****  TypeError: unsupported operand type(s) for -: 
>> 'float' and 'str'
>>      20         ****
>>      21         ****  During handling of the above exception, another 
>> exception occurred:
>>      22         ****
>>      23         ****  Traceback (most recent call last):
>>      24         ****    File "/usr/share/weewx/weewx/reportengine.py", 
>> line 248, in run
>>      25         ****      obj.start()
>>      26         ****    File "/usr/share/weewx/weewx/reportengine.py", 
>> line 465, in start
>>      27         ****      self.run()
>>      28         ****    File "/usr/share/weewx/weewx/imagegenerator.py", 
>> line 37, in run
>>      29         ****      self.gen_images(self.gen_ts)
>>      30         ****    File "/usr/share/weewx/weewx/imagegenerator.py", 
>> line 100, in gen_images
>>      31         ****      plot = self.gen_plot(plotgen_ts,
>>      32         ****             ^^^^^^^^^^^^^^^^^^^^^^^^^
>>      33         ****    File "/usr/share/weewx/weewx/imagegenerator.py", 
>> line 236, in gen_plot
>>      34         ****      start_vec_t, stop_vec_t, data_vec_t = 
>> weewx.xtypes.get_series(
>>      35         ****                                           
>>  ^^^^^^^^^^^^^^^^^^^^^^^^
>>      36         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 114, in get_series
>>      37         ****      return xtype.get_series(obs_type, timespan, 
>> db_manager, aggregate_type,
>>      38         ****             
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>      39         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 1040, in get_series
>>      40         ****      return ArchiveTable.get_series(obs_type, 
>> timespan, db_manager, aggregate_type,
>>      41         ****             
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>      42         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 210, in get_series
>>      43         ****      agg_vt = get_aggregate(obs_type, stamp, 
>> do_aggregate, db_manager,
>>      44         ****               
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>      45         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 136, in get_aggregate
>>      46         ****      return xtype.get_aggregate(obs_type, timespan, 
>> aggregate_type, db_manager,
>>      47         ****             
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>      48         ****    File "/usr/share/weewx/weewx/xtypes.py", line 
>> 1168, in get_aggregate
>>      49         ****      xsum += mag * math.cos(math.radians(90.0 - 
>> direction))
>>      50         ****                                         
>>  ~~~~~^~~~~~~~~~~
>>      51         ****  TypeError: unsupported operand type(s) for -: 
>> 'float' and 'str'
>>      52         ****  Generator terminated
>>      53 rand type(s) for -: 'float' and 'str'
>>      54 rand type(s) for -: 'float' and 'str'
>>
>> On Monday, 23 December 2024 at 18:53:18 UTC Auchtermuchty Weather wrote:
>>
>>> I was getting errors. Process of elimination showed it was the 
>>> monthwindvec image causing them, though not the day, week or year versions 
>>> of that images.
>>>
>>> I suspect data is at the bottom of this, but what data? Nothing odd in 
>>> archive.windGust or windGustDir.
>>>
>>> This is the latest WeeWx running on a Debian 12 virtual machine, and the 
>>> database has the extended schema.
>>>
>>> Turning on debugging didn't bring any extra information.
>>>
>>> Caught unrecoverable exception in generator 
>>> 'weewx.imagegenerator.ImageGenerator'
>>>         ****  unsupported operand type(s) for -: 'float' and 'str'
>>>         ****  Traceback (most recent call last):
>>>         ****    File "/usr/share/weewx/weewx/xtypes.py", line 109, in 
>>> get_series
>>>         ****      return xtype.get_series(obs_type, timespan, 
>>> db_manager, aggregate_type,
>>>         ****             
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>         ****    File "/usr/share/weewx/weewx/xtypes.py", line 1040, in 
>>> get_series
>>>         ****      return ArchiveTable.get_series(obs_type, timespan, 
>>> db_manager, aggregate_type,
>>>         ****             
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>         ****    File "/usr/share/weewx/weewx/xtypes.py", line 210, in 
>>> get_series
>>>         ****      agg_vt = get_aggregate(obs_type, stamp, do_aggregate, 
>>> db_manager,
>>>         ****               
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>         ****    File "/usr/share/weewx/weewx/xtypes.py", line 136, in 
>>> get_aggregate
>>>         ****      return xtype.get_aggregate(obs_type, timespan, 
>>> aggregate_type, db_manager,
>>>         ****             
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>         ****    File "/usr/share/weewx/weewx/xtypes.py", line 1168, in 
>>> get_aggregate
>>>         ****      xsum += mag * math.cos(math.radians(90.0 - direction))
>>>         ****                                          ~~~~~^~~~~~~~~~~
>>>         ****  TypeError: unsupported operand type(s) for -: 'float' and 
>>> 'str'
>>>         ****
>>>         ****  During handling of the above exception, another exception 
>>> occurred:
>>>         ****
>>>         ****  Traceback (most recent call last):
>>>         ****    File "/usr/share/weewx/weewx/reportengine.py", line 248, 
>>> in run
>>>         ****      obj.start()
>>>         ****    File "/usr/share/weewx/weewx/reportengine.py", line 465, 
>>> in start
>>>
>> -- 
>> 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.
>> To view this discussion visit 
>> https://groups.google.com/d/msgid/weewx-user/e8d2f679-c9e7-46a2-9588-652cf0852a90n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/e8d2f679-c9e7-46a2-9588-652cf0852a90n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 visit 
https://groups.google.com/d/msgid/weewx-user/02eb3723-61ec-4f30-867a-0c48ad460fa9n%40googlegroups.com.

Reply via email to