Pricelist: Opening with new database results in exception #11

Closed
opened 2021-05-27 00:02:02 +00:00 by ferfissimo · 1 comment
Owner

When opening the pricelist with a fresh database (simply run_flaschengeist install) results in an exception.

sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1054, "Unknown column 'drink.receipt' in 'field list'")

Full log:

MySQLdb._exceptions.OperationalError: (1054, "Unknown column 'drink.receipt' in 'field list'")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/flaschengeist/plugins/pricelist/__init__.py", line 218, in get_drinks
    result = pricelist_controller.get_drinks(public=public)
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/flaschengeist/plugins/pricelist/pricelist_controller.py", line 137, in get_drinks
    drinks = Drink.query.all()
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/orm/query.py", line 2665, in all
    return self._iter().all()
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/orm/query.py", line 2800, in _iter
    result = self.session.execute(
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/orm/session.py", line 1662, in execute
    result = conn._execute_20(statement, params or {}, execution_options)
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1520, in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1389, in _execute_clauseelement
    ret = self._execute_context(
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1748, in _execute_context
    self._handle_dbapi_exception(
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1929, in _handle_dbapi_exception
    util.raise_(
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/util/compat.py", line 198, in raise_
    raise exception
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_context
    self.dialect.do_execute(
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute
    cursor.execute(statement, parameters)
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query
    db.query(q)
  File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/MySQLdb/connections.py", line 259, in query
    _mysql.connection.query(self, query)
sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1054, "Unknown column 'drink.receipt' in 'field list'")
[SQL: SELECT drink.type_id AS drink_type_id, drink.id AS drink_id, drink.article_id AS drink_article_id, drink.package_size AS drink_package_size, drink.name AS drink_name, drink.volume AS drink_volume, drink.cost_per_volume AS drink_cost_per_volume, drink.cost_per_package AS drink_cost_per_package, drink.uuid AS drink_uuid, drink.receipt AS drink_receipt 
FROM drink]
When opening the pricelist with a fresh database (simply `run_flaschengeist install`) results in an exception. > sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1054, "Unknown column 'drink.receipt' in 'field list'") Full log: ``` MySQLdb._exceptions.OperationalError: (1054, "Unknown column 'drink.receipt' in 'field list'") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/flaschengeist/plugins/pricelist/__init__.py", line 218, in get_drinks result = pricelist_controller.get_drinks(public=public) File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/flaschengeist/plugins/pricelist/pricelist_controller.py", line 137, in get_drinks drinks = Drink.query.all() File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/orm/query.py", line 2665, in all return self._iter().all() File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/orm/query.py", line 2800, in _iter result = self.session.execute( File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/orm/session.py", line 1662, in execute result = conn._execute_20(statement, params or {}, execution_options) File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1520, in _execute_20 return meth(self, args_10style, kwargs_10style, execution_options) File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection return connection._execute_clauseelement( File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1389, in _execute_clauseelement ret = self._execute_context( File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1748, in _execute_context self._handle_dbapi_exception( File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1929, in _handle_dbapi_exception util.raise_( File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/util/compat.py", line 198, in raise_ raise exception File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_context self.dialect.do_execute( File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/sqlalchemy/engine/default.py", line 681, in do_execute cursor.execute(statement, parameters) File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/home/ferdinand/Dokumente/Projekte/Python/flaschengeist/flaschengeist/venv/lib64/python3.9/site-packages/MySQLdb/connections.py", line 259, in query _mysql.connection.query(self, query) sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1054, "Unknown column 'drink.receipt' in 'field list'") [SQL: SELECT drink.type_id AS drink_type_id, drink.id AS drink_id, drink.article_id AS drink_article_id, drink.package_size AS drink_package_size, drink.name AS drink_name, drink.volume AS drink_volume, drink.cost_per_volume AS drink_cost_per_volume, drink.cost_per_package AS drink_cost_per_package, drink.uuid AS drink_uuid, drink.receipt AS drink_receipt FROM drink] ```
ferfissimo added this to the v2.0-beta milestone 2021-05-27 00:02:02 +00:00
ferfissimo added the
🐞 bug
📺 frontend
labels 2021-05-27 00:02:03 +00:00
crimsen was assigned by ferfissimo 2021-05-27 00:02:03 +00:00
ferfissimo added
🎒 backend
and removed
📺 frontend
labels 2021-05-27 00:02:31 +00:00
Author
Owner

Can not reproduce with latest version.

Can not reproduce with latest version.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Flaschengeist/flaschengeist#11
No description provided.