Yup. That's a bug! Fixed in commit 6ad9870 <https://github.com/weewx/weewx/commit/6ad9870d66da817be256aea6267fa33a0ce61f63> .
Thanks, Jaap. -tk On Tue, Jan 7, 2020 at 2:16 PM Jaap de Munck <[email protected]> wrote: > Hello, > > Problem with MySql and create new table. > > weewx.manager: Created and initialized table 'archive5' in database 'weewx' > weewx.engine: Caught unrecoverable exception: > (1050, "Table 'archive_day_barometer' already exists") > Traceback (most recent call last): > File "/home/weewx/bin/weedb/mysql.py", line 51, in guarded_fn > return fn(*args, **kwargs) > File "/home/weewx/bin/weedb/mysql.py", line 261, in execute > self.cursor.execute(mysql_string, tuple(sql_tuple)) > File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 250, in > execute > self.errorhandler(self, exc, value) > File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 50, > in defaulterrorhandler > raise errorvalue > File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 247, in > execute > res = self._query(query) > File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 411, in > _query > rowcount = self._do_query(q) > File "/usr/lib/python3/dist-packages/MySQLdb/cursors.py", line 374, in > _do_query > db.query(q) > File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line > 292, in query > _mysql.connection.query(self, query) > _mysql_exceptions.OperationalError: (1050, "Table > 'archive_day_barometer' already exists") > > Its from a new test system. (Installed with install-weewx.sh). > At first start an Sqlite database is created (can all be seen in attached > logging). Stopped. > Configuration was then changed to a MySql database: The current MySql > database schema/user (for the 'production' system) but with a new tablename > archive5. > Tabel archive5 is created ok. > > Regards, > Jaap > > -- > You received this message because you are subscribed to the Google Groups > "weewx-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-development/a9eb77ce-82f9-44e2-9bd1-6d21c4323add%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-development/a9eb77ce-82f9-44e2-9bd1-6d21c4323add%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/CAPq0zEBpinmWtLOZx6Po5M1NMMNSbjgUAiaMxLM9Qw-%3DGcxH6Q%40mail.gmail.com.
