Skip to content

Instantly share code, notes, and snippets.

@tikismoke
Created October 30, 2015 18:51
Show Gist options
  • Save tikismoke/a188606e8503c9166e50 to your computer and use it in GitHub Desktop.
Save tikismoke/a188606e8503c9166e50 to your computer and use it in GitHub Desktop.
new install pb
==> Upgrading
INFO [alembic.migration] Context impl MySQLImpl.
INFO [alembic.migration] Will assume non-transactional DDL.
INFO [alembic.migration] Running upgrade None -> 43e639a62c8b
========= TRACEBACK =============
Traceback (most recent call last):
File "./install.py", line 505, in install
dbi.install_or_upgrade_db(args.skip_database_backup)
File "/home/pi/domogik/src/domogik/install/db_install.py", line 149, in install_or_upgrade_db
command.upgrade(self.alembic_cfg, "head")
File "/usr/lib/python2.7/dist-packages/alembic/command.py", line 120, in upgrade
script.run_env()
File "/usr/lib/python2.7/dist-packages/alembic/script.py", line 188, in run_env
util.load_python_file(self.dir, 'env.py')
File "/usr/lib/python2.7/dist-packages/alembic/util.py", line 185, in load_python_file
module = imp.load_source(module_id, path, open(path, 'rb'))
File "src/domogik/install/alembic/env.py", line 78, in <module>
run_migrations_online()
File "src/domogik/install/alembic/env.py", line 71, in run_migrations_online
context.run_migrations()
File "<string>", line 7, in run_migrations
File "/usr/lib/python2.7/dist-packages/alembic/environment.py", line 450, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/lib/python2.7/dist-packages/alembic/migration.py", line 211, in run_migrations
change(**kw)
File "src/domogik/install/alembic/versions/43e639a62c8b_upgrade_to_0_4.py", line 31, in upgrade
mysql_engine='InnoDB'
File "<string>", line 7, in create_table
File "/usr/lib/python2.7/dist-packages/alembic/operations.py", line 483, in create_table
self._table(name, *columns, **kw)
File "/usr/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 145, in create_table
self._exec(schema.CreateTable(table))
File "/usr/lib/python2.7/dist-packages/alembic/ddl/impl.py", line 75, in _exec
conn.execute(construct, *multiparams, **params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
return connection._execute_ddl(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl
compiled
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (_mysql_exceptions.OperationalError) (1050, "Table 'core_device_param' already exists") [SQL: u'\nCREATE TABLE core_device_param (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tdevice_id INTEGER NOT NULL, \n\t`key` VARCHAR(32) NOT NULL, \n\tvalue VARCHAR(255), \n\ttype VARCHAR(32), \n\tPRIMARY KEY (id, `key`), \n\tFOREIGN KEY(device_id) REFERENCES core_device (id) ON DELETE cascade\n)ENGINE=InnoDB\n\n']
=================================
ERROR [root] (<class 'sqlalchemy.exc.OperationalError'>, OperationalError('(_mysql_exceptions.OperationalError) (1050, "Table \'core_device_param\' already exists")',), <traceback object at 0x32ccf08>)
==> (<class 'sqlalchemy.exc.OperationalError'>, OperationalError('(_mysql_exceptions.OperationalError) (1050, "Table \'core_device_param\' already exists")',), <traceback object at 0x32ccf08>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment