Gary's suggestions are probably spot on.

What most likely happened is that at some point during those 11 years, you
used a visual SQL editor and deleted a value. The editor replaced the value
with an empty string, instead of NULL.

See the --check-strings
<http://weewx.com/docs/utilities.htm#wee_database_utility_check_strings>
option for more details.

-tk

On Wed, Jan 10, 2018 at 10:53 PM, gjr80 <gjroder...@gmail.com> wrote:

> Hi,
>
> Welcome to weeWX. You might want to have a look at this thread
> <https://groups.google.com/d/topic/weewx-user/X7FDi9AHh20/discussion>. I
> can't speak for the SQL and python scripts in the last post, but I would
> certainly be trying wee_database
> <http://weewx.com/docs/utilities.htm#wee_database_utility> with
> --check-strings and --fix in the first instance.
>
> Gary
>
>
> On Thursday, 11 January 2018 16:31:45 UTC+10, loonsailor wrote:
>>
>> I've got weewx running great on my shiny new ubuntu box, but I haven't
>> been able to start it from my wview database, with 11 years of data.  I
>> copy wview-archive.sdb to /var/lib/weewx/weex.sdb and start weewx, but it
>> dies immediatlely, with the following in syslog:
>>
>> Jan 10 18:41:22 ubu-mini-weather weewx[5090]: wxcalculate: The following
>> algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
>>
>> Jan 10 18:41:22 ubu-mini-weather weewx[5090]: engine: Archive will use
>> data binding wx_binding
>>
>> Jan 10 18:41:22 ubu-mini-weather weewx[5090]: engine: Record generation
>> will be attempted in 'hardware'
>>
>> Jan 10 18:41:22 ubu-mini-weather weewx[5090]: engine: Using archive
>> interval of 600 seconds (specified by hardware)
>>
>> Jan 10 18:41:22 ubu-mini-weather weewx[5090]: engine: Using binding
>> 'wx_binding' to database 'weewx.sdb'
>>
>> Jan 10 18:41:22 ubu-mini-weather weewx[5090]: manager: Starting backfill
>> of daily summaries
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]: engine: Caught
>> unrecoverable exception in engine:
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****  unsupported
>> operand type(s) for +=: 'float' and 'unicode'
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****  Traceback (most
>> recent call last):
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 865, in main
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****      engine =
>> engine_class(config_dict)
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 77, in __init__
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****
>> self.loadServices(config_dict)
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 141, in loadServices
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****
>> self.service_obj.append(weeutil.weeutil._get_object(svc)(self,
>> config_dict))
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 491, in __init__
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****
>> self.setup_database(config_dict)
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/engine.py", line 604, in setup_database
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****      _nrecs,
>> _ndays = dbmanager.backfill_day_summary() # @UnusedVariable
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/manager.py", line 1454, in backfill_day_summary
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****      
>> day_accum.addRecord(rec,
>> weight=weight)
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/accum.py", line 242, in addRecord
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****      func(self,
>> record, obs_type, add_hilo, weight)
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/accum.py", line 301, in add_value
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****      
>> self[obs_type].addSum(val,
>> weight=weight)
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****    File
>> "/usr/share/weewx/weewx/accum.py", line 88, in addSum
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****      self.sum     +=
>> val
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****  TypeError:
>> unsupported operand type(s) for +=: 'float' and 'unicode'
>>
>> Jan 10 18:41:23 ubu-mini-weather weewx[5090]:     ****  Exiting.
>>
>>
>> I've tried a couple of different database snapshots, always with the same
>> result.  It quits very quickly, so the problem is not deep into the file
>> (which is about 86MB).
>>
>> Where should I start looking?
>>
>> Thanks!
>>
>> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to