Yep, the correct wee_database syntax 
<http://weewx.com/docs/utilities.htm#wee_database_utility> will be a good 
start :) You can't pass wee_database the database name directly, what you 
need to do is define a data binding in a .conf file (might as well use 
weewx.conf) that uses your database and then use the --binding option with 
wee_database to tell wee_database which binding (and hence database) to 
use. When you define a binding you (may) also need to define a database 
under [Databases]. So if you define [[wview_binding]] and 
[[wview_archive_sqlite]] in weewx.conf as follows:

[DataBindings]
    ....

    [[wview_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = wview_archive_sqlite
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager

[Databases]
    ....

    [[wview_archive_sqlite]]
        database_name = wview-archive-fixit.sdb
        database_type = SQLite

you should be able to use the following command:

$ wee_database --fix-strings --binding=wview-binding

Gary


On Thursday, 25 January 2018 15:06:56 UTC+10, loonsailor wrote:
>
> I've finally returned from travelling, and I'm trying to get this 
> resolved.  When I run wee_database, I get the following result:
>
> jerry@ubu-mini-weather:~/Wview$ wee_database --fix-strings wview-archive-
> fixit.sdb 
> Traceback (most recent call last):
>   File "/usr/bin/wee_database", line 793, in <module>
>     main()
>   File "/usr/bin/wee_database", line 133, in main
>     config_path, config_dict = weecfg.read_config(options.config_path, 
> args)
>   File "/usr/share/weewx/weecfg/__init__.py", line 223, in read_config
>     config_dict = configobj.ConfigObj(config_path, file_error=True)
>   File "/usr/lib/python2.7/dist-packages/configobj.py", line 1229, in 
> __init__
>     self._load(infile, configspec)
>   File "/usr/lib/python2.7/dist-packages/configobj.py", line 1318, in 
> _load
>     raise error
> configobj.ConfigObjError: Parsing failed with several errors.
> First error at line 2.
> I get the exact same errors when I run with --check-strings, 
> --fix-strings, or no switch at all.  Before I go slogging through code, and 
> suggestions where I might start on resolving this?
>
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to