WedgeCoop / IS4C

Integrated Systems for Co-ops
http://is4c.coop
32 stars 17 forks source link

Installing sample data fails on products table (column count mismatch). #7

Closed lgedgar closed 13 years ago

lgedgar commented 13 years ago

This used to work, because the script /pos/installation/install_server.py was written specifically with this purpose in mind. However now when this script runs, it fails with the error:

Traceback (most recent call last):
  File "pos/installation/install_server.py", line 40, in <module>
install_server_db(*user_input)
  File "pos/installation/install_server.py", line 28, in install_server_db
exec_scripts(connection, 'is4c_op/data/*.insert')
  File "/home/lance/src/is4c-wedgecoop/pos/installation/installers.py", line 46, in exec_scripts
exec_script(connection, script_path, absolute=True)
  File "/home/lance/src/is4c-wedgecoop/pos/installation/installers.py", line 30, in exec_script
cursor.execute(sql)
  File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
  File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1136, "Column count doesn't match value count at row 1")

I've verified that the particular SQL script causing this is /pos/installation/mysql/is4c_op/data/products.insert. Apparently the number of columns in the products table (as defined by /pos/installation/mysql/is4c_op/tables/products.table) is different than the number assumed within products.insert.

jdpurdyvi commented 13 years ago

Fixed in v2.3_dev with commit: http://github.com/WedgeCoop/IS4C/commit/41b52397a93d0b94f0524f92dca0801bd3e5f2f8