Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Update from nightly, corrupt installation/database #2757

Closed
5 of 6 tasks
fakethinkpad85 opened this issue Nov 25, 2023 · 21 comments · Fixed by #2760
Closed
5 of 6 tasks

[BUG] - Update from nightly, corrupt installation/database #2757

fakethinkpad85 opened this issue Nov 25, 2023 · 21 comments · Fixed by #2760
Labels
bug Something isn't working triage

Comments

@fakethinkpad85
Copy link

fakethinkpad85 commented Nov 25, 2023

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

Used Portainer to recreate the container pulling the latest version from nightly build and i can login to Mealie and see the lists of cookbooks, but as soon as i open a recipe i get a server error.

Not sure how old the last installation was, maybe 2 months.
Tried uploading a backup that was taken just before the update but failed, resulting in another 500 code. guissing the database is mismatched from the build.

Steps to Reproduce

Update to newest nightly build from docker.

Please provide relevant logs

ERROR: 25-Nov-23 17:33:21 Unknown Error on recipe controller action
ERROR: 25-Nov-23 17:33:21 (sqlite3.OperationalError) no such column: ingredient_units_1.plural_name

{[SQL: SELECT recipes_ingredients.recipe_id AS recipes_ingredients_recipe_id, recipes_ingredients.id AS recipes_ingredients_id, recipes_ingredients.position AS recipes_ingredients_position, recipes_ingredients.title AS recipes_ingredients_title, recipes_ingredients.note AS recipes_ingredients_note, recipes_ingredients.unit_id AS recipes_ingredients_unit_id, recipes_ingredients.food_id AS recipes_ingredients_food_id, recipes_ingredients.quantity AS recipes_ingredients_quantity, recipes_ingredients.original_text AS recipes_ingredients_original_text, recipes_ingredients.reference_id AS recipes_ingredients_reference_id, recipes_ingredients.note_normalized AS recipes_ingredients_note_normalized, recipes_ingredients.original_text_normalized AS recipes_ingredients_original_text_normalized, recipes_ingredients.created_at AS recipes_ingredients_created_at, recipes_ingredients.update_at AS recipes_ingredients_update_at, ingredient_units_1.id AS ingredient_units_1_id, ingredient_units_1.group_id AS ingredient_units_1_group_id, ingredient_units_1.name AS ingredient_units_1_name, ingredient_units_1.plural_name AS ingredient_units_1_plural_name, ingredient_units_1.description AS ingredient_units_1_description, ingredient_units_1.abbreviation AS ingredient_units_1_abbreviation, ingredient_units_1.plural_abbreviation AS ingredient_units_1_plural_abbreviation, ingredient_units_1.use_abbreviation AS ingredient_units_1_use_abbreviation, ingredient_units_1.fraction AS ingredient_units_1_fraction, ingredient_units_1.name_normalized AS ingredient_units_1_name_normalized, ingredient_units_1.plural_name_normalized AS ingredient_units_1_plural_name_normalized, ingredient_units_1.abbreviation_normalized AS ingredient_units_1_abbreviation_normalized, ingredient_units_1.plural_abbreviation_normalized AS ingredient_units_1_plural_abbreviation_normalized, ingredient_units_1.created_at AS ingredient_units_1_created_at, ingredient_units_1.update_at AS ingredient_units_1_update_at, ingredient_food_extras_1.ingredient_food_id AS ingredient_food_extras_1_ingredient_food_id, ingredient_food_extras_1.id AS ingredient_food_extras_1_id, ingredient_food_extras_1.key_name AS ingredient_food_extras_1_key_name, ingredient_food_extras_1.value AS ingredient_food_extras_1_value, ingredient_food_extras_1.created_at AS ingredient_food_extras_1_created_at, ingredient_food_extras_1.update_at AS ingredient_food_extras_1_update_at, multi_purpose_labels_1.id AS multi_purpose_labels_1_id, multi_purpose_labels_1.name AS multi_purpose_labels_1_name, multi_purpose_labels_1.color AS multi_purpose_labels_1_color, multi_purpose_labels_1.group_id AS multi_purpose_labels_1_group_id, multi_purpose_labels_1.created_at AS multi_purpose_labels_1_created_at, multi_purpose_labels_1.update_at AS multi_purpose_labels_1_update_at, ingredient_foods_1.id AS ingredient_foods_1_id, ingredient_foods_1.group_id AS ingredient_foods_1_group_id, ingredient_foods_1.name AS ingredient_foods_1_name, ingredient_foods_1.plural_name AS ingredient_foods_1_plural_name, ingredient_foods_1.description AS ingredient_foods_1_description, ingredient_foods_1.label_id AS ingredient_foods_1_label_id, ingredient_foods_1.name_normalized AS ingredient_foods_1_name_normalized, ingredient_foods_1.plural_name_normalized AS ingredient_foods_1_plural_name_normalized, ingredient_foods_1.created_at AS ingredient_foods_1_created_at, ingredient_foods_1.update_at AS ingredient_foods_1_update_at
FROM recipes_ingredients LEFT OUTER JOIN ingredient_units AS ingredient_units_1 ON ingredient_units_1.id = recipes_ingredients.unit_id LEFT OUTER JOIN ingredient_foods AS ingredient_foods_1 ON ingredient_foods_1.id = recipes_ingredients.food_id LEFT OUTER JOIN ingredient_food_extras AS ingredient_food_extras_1 ON ingredient_foods_1.id = ingredient_food_extras_1.ingredient_food_id LEFT OUTER JOIN multi_purpose_labels AS multi_purpose_labels_1 ON multi_purpose_labels_1.id = ingredient_foods_1.label_id
WHERE recipes_ingredients.recipe_id IN (?) ORDER BY recipes_ingredients.position]
[parameters: ('d798f20834534c228f6f6a37c4752f11',)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Traceback (most recent call last):
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
self.dialect.do_execute(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: ingredient_units_1.plural_name
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/mealie/routes/recipe/recipe_crud_routes.py", line 286, in get_one
recipe = self.service.get_one_by_slug_or_id(slug)
File "/app/mealie/services/recipe/recipe_service.py", line 123, in get_one_by_slug_or_id
return self._get_recipe(slug_or_id, "slug")
File "/app/mealie/services/recipe/recipe_service.py", line 48, in _get_recipe
recipe = self.repos.recipes.by_group(self.group.id).get_one(data, key)
File "/app/mealie/repos/repository_generic.py", line 159, in get_one
result = self.session.execute(q).unique().scalars().one_or_none()
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1815, in one_or_none
return self._only_one_row(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 757, in _only_one_row
row: Optional[_InterimRowType[Any]] = onerow(hard_close=True)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1690, in _fetchone_impl
return self._real_result._fetchone_impl(hard_close=hard_close)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 2282, in _fetchone_impl
row = next(self.iterator, _NO_ROW)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 218, in chunks
post_load.invoke(context, path)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 1507, in invoke
loader(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 3196, in _load_for_path
self._load_via_parent(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 3272, in _load_via_parent
context.session.execute(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2246, in execute
return self._execute_internal(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2141, in _execute_internal
result: Result[Any] = compile_state_cls.orm_execute_statement(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 293, in orm_execute_statement
result = conn.execute(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1412, in execute
return meth(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 483, in _execute_on_connection
return connection._execute_clauseelement(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1635, in _execute_clauseelement
ret = self._execute_context(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1844, in _execute_context
return self._exec_single_context(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1984, in _exec_single_context
self._handle_dbapi_exception(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
self.dialect.do_execute(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: ingredient_units_1.plural_name

{[SQL: SELECT recipes_ingredients.recipe_id AS recipes_ingredients_recipe_id, recipes_ingredients.id AS recipes_ingredients_id, recipes_ingredients.position AS recipes_ingredients_position, recipes_ingredients.title AS recipes_ingredients_title, recipes_ingredients.note AS recipes_ingredients_note, recipes_ingredients.unit_id AS recipes_ingredients_unit_id, recipes_ingredients.food_id AS recipes_ingredients_food_id, recipes_ingredients.quantity AS recipes_ingredients_quantity, recipes_ingredients.original_text AS recipes_ingredients_original_text, recipes_ingredients.reference_id AS recipes_ingredients_reference_id, recipes_ingredients.note_normalized AS recipes_ingredients_note_normalized, recipes_ingredients.original_text_normalized AS recipes_ingredients_original_text_normalized, recipes_ingredients.created_at AS recipes_ingredients_created_at, recipes_ingredients.update_at AS recipes_ingredients_update_at, ingredient_units_1.id AS ingredient_units_1_id, ingredient_units_1.group_id AS ingredient_units_1_group_id, ingredient_units_1.name AS ingredient_units_1_name, ingredient_units_1.plural_name AS ingredient_units_1_plural_name, ingredient_units_1.description AS ingredient_units_1_description, ingredient_units_1.abbreviation AS ingredient_units_1_abbreviation, ingredient_units_1.plural_abbreviation AS ingredient_units_1_plural_abbreviation, ingredient_units_1.use_abbreviation AS ingredient_units_1_use_abbreviation, ingredient_units_1.fraction AS ingredient_units_1_fraction, ingredient_units_1.name_normalized AS ingredient_units_1_name_normalized, ingredient_units_1.plural_name_normalized AS ingredient_units_1_plural_name_normalized, ingredient_units_1.abbreviation_normalized AS ingredient_units_1_abbreviation_normalized, ingredient_units_1.plural_abbreviation_normalized AS ingredient_units_1_plural_abbreviation_normalized, ingredient_units_1.created_at AS ingredient_units_1_created_at, ingredient_units_1.update_at AS ingredient_units_1_update_at, ingredient_food_extras_1.ingredient_food_id AS ingredient_food_extras_1_ingredient_food_id, ingredient_food_extras_1.id AS ingredient_food_extras_1_id, ingredient_food_extras_1.key_name AS ingredient_food_extras_1_key_name, ingredient_food_extras_1.value AS ingredient_food_extras_1_value, ingredient_food_extras_1.created_at AS ingredient_food_extras_1_created_at, ingredient_food_extras_1.update_at AS ingredient_food_extras_1_update_at, multi_purpose_labels_1.id AS multi_purpose_labels_1_id, multi_purpose_labels_1.name AS multi_purpose_labels_1_name, multi_purpose_labels_1.color AS multi_purpose_labels_1_color, multi_purpose_labels_1.group_id AS multi_purpose_labels_1_group_id, multi_purpose_labels_1.created_at AS multi_purpose_labels_1_created_at, multi_purpose_labels_1.update_at AS multi_purpose_labels_1_update_at, ingredient_foods_1.id AS ingredient_foods_1_id, ingredient_foods_1.group_id AS ingredient_foods_1_group_id, ingredient_foods_1.name AS ingredient_foods_1_name, ingredient_foods_1.plural_name AS ingredient_foods_1_plural_name, ingredient_foods_1.description AS ingredient_foods_1_description, ingredient_foods_1.label_id AS ingredient_foods_1_label_id, ingredient_foods_1.name_normalized AS ingredient_foods_1_name_normalized, ingredient_foods_1.plural_name_normalized AS ingredient_foods_1_plural_name_normalized, ingredient_foods_1.created_at AS ingredient_foods_1_created_at, ingredient_foods_1.update_at AS ingredient_foods_1_update_at
FROM recipes_ingredients LEFT OUTER JOIN ingredient_units AS ingredient_units_1 ON ingredient_units_1.id = recipes_ingredients.unit_id LEFT OUTER JOIN ingredient_foods AS ingredient_foods_1 ON ingredient_foods_1.id = recipes_ingredients.food_id LEFT OUTER JOIN ingredient_food_extras AS ingredient_food_extras_1 ON ingredient_foods_1.id = ingredient_food_extras_1.ingredient_food_id LEFT OUTER JOIN multi_purpose_labels AS multi_purpose_labels_1 ON multi_purpose_labels_1.id = ingredient_foods_1.label_id
WHERE recipes_ingredients.recipe_id IN (?) ORDER BY recipes_ingredients.position]
[parameters: ('d798f20834534c228f6f6a37c4752f11',)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
INFO: 192.168.1.1:0 - "GET /api/recipes/bougatsa HTTP/1.1" 500 Internal Server Error

Mealie Version

Build
fcd4854cb87ecdc396ebf5660f3aa6ad188d3247

Deployment

Docker (Synology)

Additional Deployment Details

No response

@fakethinkpad85 fakethinkpad85 added bug Something isn't working triage labels Nov 25, 2023
@michael-genson
Copy link
Collaborator

It looks like your database wasn't auto-updated when you went to the newer Mealie version. I'm not sure why, it could be something Portainer is doing, but your db is missing some of the newer columns.

@fakethinkpad85
Copy link
Author

fakethinkpad85 commented Nov 25, 2023

that was my guess reading the logs, any way to migrate the database?
Dont know much about sql but i do have the database as i took a backup just before updating.

Family has become really reliant on Mealie it turns out..

@fakethinkpad85
Copy link
Author

@michael-genson
Copy link
Collaborator

It's supposed to happen automatically when you start up the backend, so you can try restarting the container and see what happens.

You can also try grabbing a backup, starting up a fresh instance (with an empty db) and then importing a backup

@fakethinkpad85
Copy link
Author

fakethinkpad85 commented Nov 25, 2023

tried recreating the container a few times without success. then tried a new instance, empty installation folder and tried uploading the database to that and got this error,

INFO: 192.168.1.1:0 - "POST /api/admin/backups/upload HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 436, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 292, in call
await super().call(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call
await self.app(scope, receive, self.send_with_gzip)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 291, in app
content = await serialize_response(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 154, in serialize_response
raise ResponseValidationError(
fastapi.exceptions.ResponseValidationError: 1 validation errors:
{'loc': ('response',), 'msg': 'none is not an allowed value', 'type': 'type_error.none.not_allowed'}
INFO: 192.168.1.1:0 - "GET /api/admin/backups HTTP/1.1" 200 OK
INFO: 127.0.0.1:43436 - "GET /api/app/about HTTP/1.1" 200 OK
INFO: 192.168.1.1:0 - "GET /admin/backups HTTP/1.1" 307 Temporary Redirect
INFO: 192.168.1.1:0 - "GET /admin/backups/ HTTP/1.1" 304 Not Modified
INFO: 192.168.1.1:0 - "GET /api/users/self HTTP/1.1" 200 OK
INFO: 192.168.1.1:0 - "GET /api/admin/backups HTTP/1.1" 200 OK
INFO: 192.168.1.1:0 - "GET /sw.js HTTP/1.1" 304 Not Modified
INFO: 192.168.1.1:0 - "POST /api/admin/backups/upload HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 436, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/opt/pysetup/.venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/applications.py", line 292, in call
await super().call(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 24, in call
await responder(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/gzip.py", line 44, in call
await self.app(scope, receive, self.send_with_gzip)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 291, in app
content = await serialize_response(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/fastapi/routing.py", line 154, in serialize_response
raise ResponseValidationError(
fastapi.exceptions.ResponseValidationError: 1 validation errors:
{'loc': ('response',), 'msg': 'none is not an allowed value', 'type': 'type_error.none.not_allowed'}
INFO: 192.168.1.1:0 - "GET /api/admin/backups HTTP/1.1" 200 OK
INFO: 127.0.0.1:43548 - "GET /api/app/about HTTP/1.1" 200 OK

@fakethinkpad85
Copy link
Author

sort of at a loss here since even a new instance dont seem to work, thankfully i get a backup beforehand but that dousent really seem to be much use at the moment.

Apprecate the quick responce @michael-genson and if you have any suggestions i´m all ears but it seems to be a bug with the upload migration process?

@michael-genson
Copy link
Collaborator

I'll see if I can find time to try it locally and see what's up using the backup your provided. Looks like two separate issues (originally your db didn't upgrade, then your backup didn't import). Another thing you can try in the meantime is spinning up the version you had originally, restoring the db, then try upgrading again.

@fakethinkpad85
Copy link
Author

Greatly appreciate that Michael, you have no idea. at a bind with the better half at the moment :
I dont have the old version availible sadly, was running the nightly but not sure when that was lastly updated.

@michael-genson
Copy link
Collaborator

You should be able to go back to RC1.1 without any issues (hold on the to backup just in case)

@fakethinkpad85
Copy link
Author

curious, what is the link for the RC1.1, not a big github user, below is the link i use for the nightly build but not sure about the RC build/branch.

image: ghcr.io/mealie-recipes/mealie:nightly

@michael-genson
Copy link
Collaborator

ghcr.io/mealie-recipes/mealie:v1.0.0-RC1.1

@fakethinkpad85
Copy link
Author

Tried a fresh install with RC1.1 but i´m getting the same error when uploading the database as before.

ERROR: Exception in ASGI application
....
{'loc': ('response',), 'msg': 'none is not an allowed value', 'type': 'type_error.none.not_allowed'}

@michael-genson
Copy link
Collaborator

#2760 should fix it. Turned out to be related to another migration issue I had already fixed. You can either wait for #2760 to be merged and then restore your zip, or you can manually pull from my fork

@fakethinkpad85
Copy link
Author

Ah, what a releaf, any idea on when that PR will be in the nightly?

@michael-genson
Copy link
Collaborator

Probably within the next day or two, if someone's able to look at it and approve it
Are you using SQLite or Postgres? If you're using SQLite, the database is small enough to attach here. You miiight be able to just manually replace the db file

mealie.zip

@fakethinkpad85
Copy link
Author

Sorry it took a while, had some issues but finally got it working. Cant thank you enough Michael. fresh install, replace all files and the new database you attached seemed to do the trick, really appreciated. Fingers crossed the next update goes smoother.

@michael-genson
Copy link
Collaborator

Glad to hear it worked!!

@twisterrm
Copy link

I have the same issue migrating from v1.0.0beta-5 to 1.0.0-RC2 even with the latest, which modification i had to do to the db?
Thank you in advance

@michael-genson
Copy link
Collaborator

Can you post your logs?

@twisterrm
Copy link

twisterrm commented Dec 27, 2023

Sorry for late answer, logs:

File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 483, in _execute_on_connection
return connection._execute_clauseelement(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1635, in _execute_clauseelement
ret = self._execute_context(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1844, in _execute_context
return self._exec_single_context(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1984, in _exec_single_context
self._handle_dbapi_exception(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context
self.dialect.do_execute(
File "/opt/pysetup/.venv/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: ingredient_units.plural_name
[SQL: SELECT ingredient_units.id AS ingredient_units_id, ingredient_units.group_id AS ingredient_units_group_id, ingredient_units.name AS ingredient_units_name, ingredient_units.plural_name AS ingredient_units_plural_name, ingredient_units.description AS ingredient_units_description, ingredient_units.abbreviation AS ingredient_units_abbreviation, ingredient_units.plural_abbreviation AS ingredient_units_plural_abbreviation, ingredient_units.use_abbreviation AS ingredient_units_use_abbreviation, ingredient_units.fraction AS ingredient_units_fraction, ingredient_units.name_normalized AS ingredient_units_name_normalized, ingredient_units.plural_name_normalized AS ingredient_units_plural_name_normalized, ingredient_units.abbreviation_normalized AS ingredient_units_abbreviation_normalized, ingredient_units.plural_abbreviation_normalized AS ingredient_units_plural_abbreviation_normalized, ingredient_units.created_at AS ingredient_units_created_at, ingredient_units.update_at AS ingredient_units_update_at
FROM ingredient_units
WHERE ingredient_units.id = ?]
[parameters: ('b0d10a33099148eca163823adfe83e08',)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
INFO: 95.235.209.67:0 - "GET /api/recipes?page=1&perPage=64&orderBy=created_at&orderDirection=desc&paginationSeed=1703675163561&searchSeed=1703675163561&search=&requireAllCategories=false&requireAllTags=false&requireAllTools=false&requireAllFoods=false HTTP/1.1" 200 OK
INFO: 95.235.209.67:0 - "GET /api/recipes?page=3&perPage=32&orderBy=created_at&orderDirection=desc&paginationSeed=1703675163561&searchSeed=1703675163561&search=&requireAllCategories=false&requireAllTags=false&requireAllTools=false&requireAllFoods=false HTTP/1.1" 200 OK
INFO: 127.0.0.1:56266 - "GET /api/app/about HTTP/1.1" 200 OK
INFO: 95.235.209.67:0 - "GET /_nuxt/5f99049.js HTTP/1.1" 200 OK
INFO: 95.235.209.67:0 - "GET /_nuxt/ecabb94.js HTTP/1.1" 200 OK
INFO: 95.235.209.67:0 - "GET /_nuxt/fa52bff.js HTTP/1.1" 200 OK
INFO: 95.235.209.67:0 - "GET /_nuxt/537622c.js HTTP/1.1" 200 OK
INFO: 95.235.209.67:0 - "GET /_nuxt/a2fbbf2.js HTTP/1.1" 200 OK
ERROR: 27-Dec-23 12:06:07 Unknown Error on recipe controller action
ERROR: 27-Dec-23 12:06:07 (sqlite3.OperationalError) no such column: ingredient_units_1.plural_name

@michael-genson
Copy link
Collaborator

I would stay on 1.0.0b5 for now and wait for #2859 to get merged. Once you can pull nightly (or any release with that PR) you should be able to either upgrade or restore from a backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants