Hi,
I am trying to add some new types to the database and I have run into an
error.
Following the customization docs I added these lines to user/extensions.py:
import schemas.wview
schema_with_weatherflow = schemas.wview.schema +
[('lightningStrikeCount','REAL')] + ['lightningStrikeDistance','REAL'] +
['illuminance','REAL'] + ['precipitationType','REAL'] + ['windLull','REAL']
+ ['rssi','REAL'] + ['hubRssi','REAL'] + ['hubStatus','REAL']
I then ran:
sudo wee_database weewx.conf --reconfigure
Using configuration file weewx.conf
Using database binding 'wx_binding', which is bound to database
'archive_sqlite'
Copying database 'weewx.sdb' to 'weewx.sdb_new'
The new database will use the same unit system as the old ('US').
Are you sure you wish to proceed (y/n)? y
Traceback (most recent call last):
File "/usr/bin/wee_database", line 794, in <module>
main()
File "/usr/bin/wee_database", line 156, in main
reconfigMainDatabase(config_dict, db_binding)
File "/usr/bin/wee_database", line 336, in reconfigMainDatabase
new_schema=manager_dict['schema'])
File "/usr/share/weewx/weewx/manager.py", line 817, in reconfig
with Manager.open_with_create(new_db_dict, schema=new_schema) as
new_archive:
File "/usr/share/weewx/weewx/manager.py", line 141, in open_with_create
dbmanager = cls(connection, table_name=table_name, schema=schema)
File "/usr/share/weewx/weewx/manager.py", line 82, in __init__
self._initialize_database(schema)
File "/usr/share/weewx/weewx/manager.py", line 175, in
_initialize_database
_sqltypestr = ', '.join(["`%s` %s" % _type for _type in schema])
TypeError: not enough arguments for format string
What am I missing?
Thanks,
Patrick
--
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.