TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.54k stars 584 forks source link

Update to 1.5.6 - Server Error 500 #2613

Closed johndoe0815 closed 1 year ago

johndoe0815 commented 1 year ago

Tandoor Version

1.5.5

Setup

Docker / Docker-Compose

Reverse Proxy

No reverse proxy

Other

No response

Bug description

I run tandoor on docker with portainer inside a proxmox container. I started with 1.5.4 and successfully updated to 1.5.5 in the past by just redeploying with the latest images. When doing the same now to update to 1.5.6, docker confirms success, but when I want to access tandoor (via just internal IP), it only shows a white page with "Server Error (500)". When I restart the stack, it first shows "Tandoor Recipes is not yet available 502", which still looks normal, but then same error.

Besides this problem, I was wondering why since 1.5.5 the version is not shown anymore in the system overview, which was still the case with 1.5.4, instead it is showing the translation status. I saw no way anymore to actually show which version I am on. grafik

Relevant logs

No response

vabene1111 commented 1 year ago

please set DEBUG=1 in .env to get some proper logs from the container

the version should be shown but was broken in 1.5.5, it shows both the last commit and the version number from the git refs.

johndoe0815 commented 1 year ago

Ok, this is what is being shown with debug=1: grafik

And the detailed traceback:

Environment:

Request Method: GET
Request URL: http://192.168.178.24/search/

Django Version: 4.1.10
Python Version: 3.10.13
Installed Applications:
['dal',
 'dal_select2',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.sites',
 'django.contrib.staticfiles',
 'django.contrib.postgres',
 'oauth2_provider',
 'django_prometheus',
 'django_tables2',
 'corsheaders',
 'crispy_forms',
 'rest_framework',
 'rest_framework.authtoken',
 'django_cleanup.apps.CleanupConfig',
 'webpack_loader',
 'django_js_reverse',
 'hcaptcha',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'cookbook.apps.CookbookConfig',
 'treebeard']
Installed Middleware:
['corsheaders.middleware.CorsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'cookbook.helper.scope_middleware.ScopeMiddleware']

Template error:
In template /opt/recipes/cookbook/templates/base.html, error at line 35
   column cookbook_userpreference.show_step_ingredients does not exist
LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
                                                             ^

   25 :     <meta name="msapplication-TileImage" content="/mstile-144x144.png">
   26 : 
   27 : 
   28 :     <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#161616">
   29 :     <meta name="msapplication-TileColor" content="#161616">
   30 :     <meta name="theme-color" content="#ffffff">
   31 : 
   32 :     <meta name="apple-mobile-web-app-capable" content="yes"/>
   33 : 
   34 :     <!-- Bootstrap 4 -->
   35 :     <link id="id_main_css" href=" {% theme_url request %} " rel="stylesheet">
   36 :     <link href="{% static 'css/app.min.css' %}" rel="stylesheet">
   37 :     <script src="{% static 'js/jquery-3.5.1.min.js' %}"></script>
   38 : 
   39 :     <script src="{% static 'js/popper.min.js' %}"></script>
   40 :     <script src="{% static 'js/bootstrap.min.js' %}"></script>
   41 : 
   42 :     <!-- Select2 for use with django autocomplete light -->
   43 :     <link href="{% static 'css/select2.min.css' %}" rel="stylesheet"/>
   44 :     <script src="{% static 'js/select2.min.js' %}"></script>
   45 : 

Traceback (most recent call last):
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 444, in __get__
    rel_obj = self.related.get_cached_value(instance)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
    return instance._state.fields_cache[cache_name]

During handling of the above exception ('userpreference'), another exception occurred:
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)

The above exception (column cookbook_userpreference.show_step_ingredients does not exist
LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
                                                             ^
) was the direct cause of the following exception:
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/recipes/cookbook/views/views.py", line 51, in search
    return render(request, 'search.html', {})
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/shortcuts.py", line 24, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/base.py", line 175, in render
    return self._render(context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/test/utils.py", line 111, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/loader_tags.py", line 157, in render
    return compiled_parent._render(context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/test/utils.py", line 111, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
    return SafeString("".join([node.render_annotated(context) for node in self]))
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
    return self.render(context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/template/library.py", line 237, in render
    output = self.func(*resolved_args, **resolved_kwargs)
  File "/opt/recipes/cookbook/templatetags/theming_tags.py", line 21, in theme_url
    if request.user.userpreference.theme in themes:
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/utils/functional.py", line 268, in inner
    return func(_wrapped, *args)
  File "/usr/local/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/opt/recipes/venv/lib/python3.10/site-packages/annoying/fields.py", line 36, in __get__
    .__get__(instance, instance_type)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 452, in __get__
    rel_obj = self.get_queryset(instance=instance).get(**filter_args)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 646, in get
    num = len(clone)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 376, in __len__
    self._fetch_all()
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1867, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 87, in __iter__
    results = compiler.execute_sql(
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1398, in execute_sql
    cursor.execute(sql, params)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
    return super().execute(sql, params)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /search/
Exception Value: column cookbook_userpreference.show_step_ingredients does not exist
LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
                                                             ^
smilerz commented 1 year ago

It looks like you've somehow missed some database migrations. Can you please restart the tandoor container and share all of the logs from that container.

johndoe0815 commented 1 year ago

Ok, I restarted the stack, this is what is being displayed afterwards: grafik

Traceback:

Environment:

Request Method: GET
Request URL: http://192.168.178.24/

Django Version: 4.1.10
Python Version: 3.10.13
Installed Applications:
['dal',
 'dal_select2',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.sites',
 'django.contrib.staticfiles',
 'django.contrib.postgres',
 'oauth2_provider',
 'django_prometheus',
 'django_tables2',
 'corsheaders',
 'crispy_forms',
 'rest_framework',
 'rest_framework.authtoken',
 'django_cleanup.apps.CleanupConfig',
 'webpack_loader',
 'django_js_reverse',
 'hcaptcha',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'cookbook.apps.CookbookConfig',
 'treebeard']
Installed Middleware:
['corsheaders.middleware.CorsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'cookbook.helper.scope_middleware.ScopeMiddleware']

Traceback (most recent call last):
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 444, in __get__
    rel_obj = self.related.get_cached_value(instance)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
    return instance._state.fields_cache[cache_name]

During handling of the above exception ('userpreference'), another exception occurred:
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)

The above exception (column cookbook_userpreference.show_step_ingredients does not exist
LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
                                                             ^
) was the direct cause of the following exception:
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
    response = get_response(request)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/recipes/cookbook/views/views.py", line 43, in index
    return HttpResponseRedirect(page_map.get(request.user.userpreference.default_page))
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/utils/functional.py", line 268, in inner
    return func(_wrapped, *args)
  File "/usr/local/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/opt/recipes/venv/lib/python3.10/site-packages/annoying/fields.py", line 36, in __get__
    .__get__(instance, instance_type)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 452, in __get__
    rel_obj = self.get_queryset(instance=instance).get(**filter_args)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 646, in get
    num = len(clone)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 376, in __len__
    self._fetch_all()
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1867, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 87, in __iter__
    results = compiler.execute_sql(
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1398, in execute_sql
    cursor.execute(sql, params)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
    return super().execute(sql, params)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
    return self._execute_with_wrappers(
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
    with self.db.wrap_database_errors:
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
    return self.cursor.execute(sql, params)

Exception Type: ProgrammingError at /
Exception Value: column cookbook_userpreference.show_step_ingredients does not exist
LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
                                                             ^

grafik

Meta:

Variable | Value -- | -- CSRF_COOKIE | 'IQcMMADUMGFlu4dObOptw5oFvGxTGq1L' HTTP_ACCEPT | 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' HTTP_ACCEPT_ENCODING | 'gzip, deflate' HTTP_ACCEPT_LANGUAGE | 'de,en-US;q=0.7,en;q=0.3' HTTP_CONNECTION | 'close' HTTP_COOKIE | ('csrftoken=IQcMMADUMGFlu5dObOptw8oFvGxTGq1L; ' 'messages=W1siX91qc85uX21lc7NhZ2UiLDAsMjUsIkVyZm1sZ3JlaWNoIGFscyBmbG1yaWFuIGFuZ2VtZWxkZXQuIiwiIl1d:1qdZSK:1Wa_3DdEF2glwdVYM8JUELK6zQFv0rzbF1XwnTc0eKU; ' 'sessionid=15qm6zb2nf5este32jbkc51x9ueuqxcs') HTTP_DNT | '1' HTTP_HOST | '192.168.178.24' HTTP_SEC_GPC | '1' HTTP_UPGRADE_INSECURE_REQUESTS | '1' HTTP_USER_AGENT | ('Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 ' 'Firefox/117.0') PATH_INFO | '/' QUERY_STRING | '' RAW_URI | '/' REMOTE_ADDR | '172.18.0.4' REMOTE_PORT | '49684' REQUEST_METHOD | 'GET' SCRIPT_NAME | '' SERVER_NAME | '0.0.0.0' SERVER_PORT | '8080' SERVER_PROTOCOL | 'HTTP/1.0' SERVER_SOFTWARE | 'gunicorn/20.1.0' gunicorn.socket | wsgi.errors | wsgi.file_wrapper | wsgi.input | wsgi.input_terminated | True wsgi.multiprocess | True wsgi.multithread | True wsgi.run_once | False wsgi.url_scheme | 'http' wsgi.version | (1, 0)

Settings:

ABSOLUTE_URL_OVERRIDES | {} -- | -- ACCOUNT_ADAPTER | 'cookbook.helper.AllAuthCustomAdapter' ACCOUNT_EMAIL_CONFIRMATION_ANONYMOUS_REDIRECT_URL | 'index' ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS | 90 ACCOUNT_EMAIL_REQUIRED | True ACCOUNT_EMAIL_SUBJECT_PREFIX | '[Tandoor Recipes] ' ACCOUNT_LOGOUT_ON_GET | True ACCOUNT_LOGOUT_REDIRECT_URL | 'index' ACCOUNT_MAX_EMAIL_ADDRESSES | 3 ACCOUNT_SIGNUP_EMAIL_ENTER_TWICE | True ACCOUNT_SIGNUP_FORM_CLASS | 'cookbook.forms.AllAuthSignupForm' ADMINS | [] ALLOWED_HOSTS | ['*'] APPEND_SLASH | True AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend'] AUTH_PASSWORD_VALIDATORS | '********************' AUTH_USER_MODEL | 'auth.User' AWS_ENABLED | False BASE_DIR | '/opt/recipes' CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': 'default'}} CACHE_MIDDLEWARE_ALIAS | 'default' CACHE_MIDDLEWARE_KEY_PREFIX | '********************' CACHE_MIDDLEWARE_SECONDS | 600 COMMENT_PREF_DEFAULT | True CORS_ALLOW_METHODS | ['GET', 'OPTIONS', 'POST'] CORS_ORIGIN_ALLOW_ALL | True CORS_URLS_REGEX | '^/api/bookmarklet-import.* CRISPY_TEMPLATE_PACK | 'bootstrap4' CSRF_COOKIE_AGE | 31449600 CSRF_COOKIE_DOMAIN | None CSRF_COOKIE_HTTPONLY | False CSRF_COOKIE_MASKED | False CSRF_COOKIE_NAME | 'csrftoken' CSRF_COOKIE_PATH | '/' CSRF_COOKIE_SAMESITE | 'Lax' CSRF_COOKIE_SECURE | False CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' CSRF_TRUSTED_ORIGINS | [' 192.168.178.23'] CSRF_USE_SESSIONS | False DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_HEALTH_CHECKS': False, 'CONN_MAX_AGE': 60, 'ENGINE': 'django.db.backends.postgresql', 'HOST': 'db_recipes', 'NAME': 'djangodb', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '5432', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'djangouser'}} DATABASE_ROUTERS | [] DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 DATA_UPLOAD_MAX_NUMBER_FILES | 100 DATETIME_FORMAT | 'N j, Y, P' DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M'] DATE_FORMAT | 'N j, Y' DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] DEBUG | True DEBUG_PROPAGATE_EXCEPTIONS | False DEBUG_TOOLBAR | False DECIMAL_SEPARATOR | '.' DEFAULT_AUTO_FIELD | 'django.db.models.AutoField' DEFAULT_CHARSET | 'utf-8' DEFAULT_EXCEPTION_REPORTER | 'django.views.debug.ExceptionReporter' DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' DEFAULT_FROM_EMAIL | 'webmaster@localhost' DEFAULT_INDEX_TABLESPACE | '' DEFAULT_TABLESPACE | '' DISABLE_TREE_FIX_STARTUP | False DISALLOWED_USER_AGENTS | [] DJANGO_TABLES2_PAGE_RANGE | 8 DJANGO_TABLES2_TEMPLATE | 'cookbook/templates/generic/table_template.html' EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST | '' EMAIL_HOST_PASSWORD | '********************' EMAIL_HOST_USER | '' EMAIL_PORT | 25 EMAIL_SSL_CERTFILE | None EMAIL_SSL_KEYFILE | '********************' EMAIL_SUBJECT_PREFIX | '[Django] ' EMAIL_TIMEOUT | None EMAIL_USE_LOCALTIME | False EMAIL_USE_SSL | False EMAIL_USE_TLS | False ENABLE_METRICS | False ENABLE_PDF_EXPORT | False ENABLE_SIGNUP | False EXPORT_FILE_CACHE_DURATION | 600 FDA_API_KEY | '********************' FILE_UPLOAD_DIRECTORY_PERMISSIONS | None FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 FILE_UPLOAD_PERMISSIONS | 420 FILE_UPLOAD_TEMP_DIR | None FIRST_DAY_OF_WEEK | 0 FIXTURE_DIRS | [] FORCE_SCRIPT_NAME | None FORMAT_MODULE_PATH | None FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' FRACTION_PREF_DEFAULT | False GUNICORN_MEDIA | False HCAPTCHA_SECRET | '********************' HCAPTCHA_SITEKEY | '********************' HOSTED | False IGNORABLE_404_URLS | [] IMPRINT_URL | '' INSTALLED_APPS | ['dal', 'dal_select2', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.sites', 'django.contrib.staticfiles', 'django.contrib.postgres', 'oauth2_provider', 'django_prometheus', 'django_tables2', 'corsheaders', 'crispy_forms', 'rest_framework', 'rest_framework.authtoken', 'django_cleanup.apps.CleanupConfig', 'webpack_loader', 'django_js_reverse', 'hcaptcha', 'allauth', 'allauth.account', 'allauth.socialaccount', 'cookbook.apps.CookbookConfig', 'treebeard'] INTERNAL_IPS | ['127.0.0.1'] JS_REVERSE_OUTPUT_PATH | '/opt/recipes/cookbook/static/django_js_reverse' JS_REVERSE_SCRIPT_PREFIX | '' KJ_PREF_DEFAULT | False LANGUAGES | [('hy', 'Armenian '), ('bg', 'Bulgarisch'), ('ca', 'Katalanisch'), ('cs', 'Tschechisch'), ('da', 'Dänisch'), ('nl', 'Niederländisch'), ('en', 'Englisch'), ('fr', 'Französisch'), ('de', 'Deutsch'), ('hu', 'Ungarisch'), ('it', 'Italienisch'), ('lv', 'Lettisch'), ('nb', 'Norwegian '), ('pl', 'Polnisch'), ('ru', 'Russisch'), ('es', 'Spanisch'), ('sv', 'Schwedisch')] LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'fa', 'ur'] LANGUAGE_CODE | 'en' LANGUAGE_COOKIE_AGE | None LANGUAGE_COOKIE_DOMAIN | None LANGUAGE_COOKIE_HTTPONLY | False LANGUAGE_COOKIE_NAME | 'django_language' LANGUAGE_COOKIE_PATH | '/' LANGUAGE_COOKIE_SAMESITE | None LANGUAGE_COOKIE_SECURE | False LDAP_AUTH | False LOCALE_PATHS | [] LOGGING | {} LOGGING_CONFIG | 'logging.config.dictConfig' LOGIN_REDIRECT_URL | 'index' LOGIN_URL | '/accounts/login/' LOGOUT_REDIRECT_URL | 'index' MANAGERS | [] MEDIA_ROOT | '/opt/recipes/mediafiles' MEDIA_URL | '/media/' MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' MESSAGE_TAGS | {40: 'danger'} MIDDLEWARE | ['corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'cookbook.helper.scope_middleware.ScopeMiddleware'] MIGRATION_MODULES | {} MONTH_DAY_FORMAT | 'F j' NUMBER_GROUPING | 0 OAUTH2_PROVIDER | {'SCOPES': {'bookmarklet': 'only access to bookmarklet', 'read': 'Read scope', 'write': 'Write scope'}} PASSWORD_HASHERS | '********************' PASSWORD_RESET_TIMEOUT | '********************' PLUGINS | [] PLUGINS_DIRECTORY | '/opt/recipes/recipes/plugins' PREPEND_WWW | False PRIVACY_URL | '' READ_SCOPE | 'read' REMOTE_USER_AUTH | False REST_FRAMEWORK | {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.SessionAuthentication', 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', 'rest_framework.authentication.BasicAuthentication'), 'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.IsAuthenticated']} ROOT_URLCONF | 'recipes.urls' SCRIPT_NAME | '' SECRET_KEY | '********************' SECRET_KEY_FALLBACKS | '********************' SECURE_CONTENT_TYPE_NOSNIFF | True SECURE_CROSS_ORIGIN_OPENER_POLICY | 'same-origin' SECURE_HSTS_INCLUDE_SUBDOMAINS | False SECURE_HSTS_PRELOAD | False SECURE_HSTS_SECONDS | 0 SECURE_PROXY_SSL_HEADER | ('HTTP_X_FORWARDED_PROTO', 'https') SECURE_REDIRECT_EXEMPT | [] SECURE_REFERRER_POLICY | 'same-origin' SECURE_SSL_HOST | None SECURE_SSL_REDIRECT | False SERVER_EMAIL | 'root@localhost' SESSION_CACHE_ALIAS | 'default' SESSION_COOKIE_AGE | 31536000 SESSION_COOKIE_DOMAIN | None SESSION_COOKIE_HTTPONLY | True SESSION_COOKIE_NAME | 'sessionid' SESSION_COOKIE_PATH | '/' SESSION_COOKIE_SAMESITE | 'Lax' SESSION_COOKIE_SECURE | False SESSION_ENGINE | 'django.contrib.sessions.backends.db' SESSION_EXPIRE_AT_BROWSER_CLOSE | False SESSION_FILE_PATH | None SESSION_SAVE_EVERY_REQUEST | False SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' SETTINGS_MODULE | 'recipes.settings' SHARING_ABUSE | False SHARING_LIMIT | 0 SHOPPING_MIN_AUTOSYNC_INTERVAL | 5 SHORT_DATETIME_FORMAT | 'm/d/Y P' SHORT_DATE_FORMAT | 'm/d/Y' SIGNING_BACKEND | 'django.core.signing.TimestampSigner' SILENCED_SYSTEM_CHECKS | [] SITE_ID | 1 SOCIALACCOUNT_EMAIL_VERIFICATION | 'none' SOCIALACCOUNT_PROVIDERS | {} SOCIAL_DEFAULT_ACCESS | False SOCIAL_DEFAULT_GROUP | 'guest' SOCIAL_PROVIDERS | [] SORT_TREE_BY_NAME | False SPACE_DEFAULT_ALLOW_SHARING | True SPACE_DEFAULT_MAX_FILES | 0 SPACE_DEFAULT_MAX_RECIPES | 0 SPACE_DEFAULT_MAX_USERS | 0 STATICFILES_DIRS | [] STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] STATICFILES_STORAGE | 'whitenoise.storage.CompressedManifestStaticFilesStorage' STATIC_ROOT | '/opt/recipes/staticfiles' STATIC_URL | '/static/' STICKY_NAV_PREF_DEFAULT | True TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/opt/recipes/templates', '/opt/recipes/cookbook/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.media', 'cookbook.helper.context_processors.context_settings']}}] TERMS_URL | '' TEST_NON_SERIALIZED_APPS | [] TEST_RUNNER | 'cookbook.helper.CustomTestRunner.CustomTestRunner' THOUSAND_SEPARATOR | ',' TIME_FORMAT | 'P' TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] TIME_ZONE | 'Europe/Berlin' USE_DEPRECATED_PYTZ | False USE_I18N | True USE_L10N | True USE_THOUSAND_SEPARATOR | False USE_TZ | True USE_X_FORWARDED_HOST | False USE_X_FORWARDED_PORT | False VUE_DIR | '/opt/recipes/vue' WEBPACK_LOADER | {'DEFAULT': {'BUNDLE_DIR_NAME': 'vue/', 'CACHE': False, 'IGNORE': ['.+\\.hot-update.js', '.+\\.map'], 'POLL_INTERVAL': 0.1, 'STATS_FILE': '/opt/recipes/vue/webpack-stats.json', 'TIMEOUT': None}} WRITE_SCOPE | 'write' WSGI_APPLICATION | 'recipes.wsgi.application' X_FRAME_OPTIONS | 'DENY' YEAR_MONTH_FORMAT | 'F Y'
smilerz commented 1 year ago

Can you please share the full logs from the container instead of what is displayed in the browser.

johndoe0815 commented 1 year ago

Ok, here the log from inside portainer:

web:

2023-09-07T18:21:48.151914643Z Checking configuration...
2023-09-07T18:21:48.152008421Z Waiting for database to be ready...
2023-09-07T18:21:48.189228228Z Database is ready
2023-09-07T18:21:48.189266808Z Migrating database
2023-09-07T18:21:48.867473690Z DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
2023-09-07T18:21:52.815269392Z SystemCheckError: System check identified some issues:
2023-09-07T18:21:52.815331288Z 
2023-09-07T18:21:52.815342687Z ERRORS:
2023-09-07T18:21:52.815353570Z ?: (4_0.E001) As of Django 4.0, the values in the CSRF_TRUSTED_ORIGINS setting must start with a scheme (usually http:// or https://) but found  192.168.178.24. See the release notes for details.
2023-09-07T18:21:53.287416677Z Generating static files
2023-09-07T18:21:53.541418266Z DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
2023-09-07T18:21:56.067087909Z js-reverse file written to /opt/recipes/cookbook/static/django_js_reverse
2023-09-07T18:21:56.822832527Z DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
2023-09-07T18:22:09.962969401Z 
2023-09-07T18:22:09.963006096Z 1 static file copied to '/opt/recipes/staticfiles', 643 unmodified, 1376 post-processed.
2023-09-07T18:22:10.217675343Z Done
2023-09-07T18:22:10.628623117Z [2023-09-07 18:22:10 +0000] [1] [INFO] Starting gunicorn 20.1.0
2023-09-07T18:22:10.629530991Z [2023-09-07 18:22:10 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
2023-09-07T18:22:10.629744877Z [2023-09-07 18:22:10 +0000] [1] [INFO] Using worker: gthread
2023-09-07T18:22:10.636249031Z [2023-09-07 18:22:10 +0000] [12] [INFO] Booting worker with pid: 12
2023-09-07T18:22:10.664462359Z [2023-09-07 18:22:10 +0000] [13] [INFO] Booting worker with pid: 13
2023-09-07T18:22:10.736371851Z [2023-09-07 18:22:10 +0000] [14] [INFO] Booting worker with pid: 14
2023-09-07T18:22:11.470203824Z DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
2023-09-07T18:22:11.517268286Z DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
2023-09-07T18:22:11.641251601Z DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
2023-09-07T18:22:44.388292558Z Internal Server Error: /
2023-09-07T18:22:44.388337625Z Traceback (most recent call last):
2023-09-07T18:22:44.388350321Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 444, in __get__
2023-09-07T18:22:44.388362508Z     rel_obj = self.related.get_cached_value(instance)
2023-09-07T18:22:44.388374129Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
2023-09-07T18:22:44.388386266Z     return instance._state.fields_cache[cache_name]
2023-09-07T18:22:44.388417329Z KeyError: 'userpreference'
2023-09-07T18:22:44.388429155Z 
2023-09-07T18:22:44.388440677Z During handling of the above exception, another exception occurred:
2023-09-07T18:22:44.388452371Z 
2023-09-07T18:22:44.388463617Z Traceback (most recent call last):
2023-09-07T18:22:44.388474772Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
2023-09-07T18:22:44.388486391Z     return self.cursor.execute(sql, params)
2023-09-07T18:22:44.388497727Z psycopg2.errors.UndefinedColumn: column cookbook_userpreference.show_step_ingredients does not exist
2023-09-07T18:22:44.388509130Z LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
2023-09-07T18:22:44.388520737Z                                                              ^
2023-09-07T18:22:44.388531976Z 
2023-09-07T18:22:44.388542865Z 
2023-09-07T18:22:44.388553877Z The above exception was the direct cause of the following exception:
2023-09-07T18:22:44.388564991Z 
2023-09-07T18:22:44.388576007Z Traceback (most recent call last):
2023-09-07T18:22:44.388587199Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
2023-09-07T18:22:44.388598892Z     response = get_response(request)
2023-09-07T18:22:44.388610015Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
2023-09-07T18:22:44.388621705Z     response = wrapped_callback(request, *callback_args, **callback_kwargs)
2023-09-07T18:22:44.388633064Z   File "/opt/recipes/cookbook/views/views.py", line 43, in index
2023-09-07T18:22:44.388644648Z     return HttpResponseRedirect(page_map.get(request.user.userpreference.default_page))
2023-09-07T18:22:44.388656394Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/utils/functional.py", line 268, in inner
2023-09-07T18:22:44.388668296Z     return func(_wrapped, *args)
2023-09-07T18:22:44.388679638Z   File "/usr/local/lib/python3.10/contextlib.py", line 79, in inner
2023-09-07T18:22:44.388694334Z     return func(*args, **kwds)
2023-09-07T18:22:44.388705792Z   File "/opt/recipes/venv/lib/python3.10/site-packages/annoying/fields.py", line 36, in __get__
2023-09-07T18:22:44.388717555Z     .__get__(instance, instance_type)
2023-09-07T18:22:44.388728797Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 452, in __get__
2023-09-07T18:22:44.388742420Z     rel_obj = self.get_queryset(instance=instance).get(**filter_args)
2023-09-07T18:22:44.388754048Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 646, in get
2023-09-07T18:22:44.388765748Z     num = len(clone)
2023-09-07T18:22:44.388777108Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 376, in __len__
2023-09-07T18:22:44.388798540Z     self._fetch_all()
2023-09-07T18:22:44.388810267Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1867, in _fetch_all
2023-09-07T18:22:44.388822027Z     self._result_cache = list(self._iterable_class(self))
2023-09-07T18:22:44.388833409Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 87, in __iter__
2023-09-07T18:22:44.388845131Z     results = compiler.execute_sql(
2023-09-07T18:22:44.388856428Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1398, in execute_sql
2023-09-07T18:22:44.388868430Z     cursor.execute(sql, params)
2023-09-07T18:22:44.388879931Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
2023-09-07T18:22:44.388891632Z     return super().execute(sql, params)
2023-09-07T18:22:44.388902900Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
2023-09-07T18:22:44.388914542Z     return self._execute_with_wrappers(
2023-09-07T18:22:44.388925642Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
2023-09-07T18:22:44.388937340Z     return executor(sql, params, many, context)
2023-09-07T18:22:44.388948798Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
2023-09-07T18:22:44.388960499Z     with self.db.wrap_database_errors:
2023-09-07T18:22:44.388971843Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
2023-09-07T18:22:44.388983571Z     raise dj_exc_value.with_traceback(traceback) from exc_value
2023-09-07T18:22:44.388995160Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
2023-09-07T18:22:44.389006863Z     return self.cursor.execute(sql, params)
2023-09-07T18:22:44.389017894Z django.db.utils.ProgrammingError: column cookbook_userpreference.show_step_ingredients does not exist
2023-09-07T18:22:44.389029379Z LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
2023-09-07T18:22:44.389041055Z                                                              ^
2023-09-07T18:22:44.389066889Z 
2023-09-07T18:22:44.389377201Z Internal Server Error: /
2023-09-07T18:22:44.389391627Z Traceback (most recent call last):
2023-09-07T18:22:44.389403549Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 444, in __get__
2023-09-07T18:22:44.389420514Z     rel_obj = self.related.get_cached_value(instance)
2023-09-07T18:22:44.389432303Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/mixins.py", line 15, in get_cached_value
2023-09-07T18:22:44.389452811Z     return instance._state.fields_cache[cache_name]
2023-09-07T18:22:44.389464317Z KeyError: 'userpreference'
2023-09-07T18:22:44.389475517Z 
2023-09-07T18:22:44.389486687Z During handling of the above exception, another exception occurred:
2023-09-07T18:22:44.389498078Z 
2023-09-07T18:22:44.389509351Z Traceback (most recent call last):
2023-09-07T18:22:44.389520756Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
2023-09-07T18:22:44.389532320Z     return self.cursor.execute(sql, params)
2023-09-07T18:22:44.389543469Z psycopg2.errors.UndefinedColumn: column cookbook_userpreference.show_step_ingredients does not exist
2023-09-07T18:22:44.389555385Z LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
2023-09-07T18:22:44.389567187Z                                                              ^
2023-09-07T18:22:44.389578754Z 
2023-09-07T18:22:44.389589763Z 
2023-09-07T18:22:44.389600776Z The above exception was the direct cause of the following exception:
2023-09-07T18:22:44.389611910Z 
2023-09-07T18:22:44.389622958Z Traceback (most recent call last):
2023-09-07T18:22:44.389634697Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
2023-09-07T18:22:44.389646378Z     response = get_response(request)
2023-09-07T18:22:44.389657670Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
2023-09-07T18:22:44.389669289Z     response = wrapped_callback(request, *callback_args, **callback_kwargs)
2023-09-07T18:22:44.389680712Z   File "/opt/recipes/cookbook/views/views.py", line 43, in index
2023-09-07T18:22:44.389692053Z     return HttpResponseRedirect(page_map.get(request.user.userpreference.default_page))
2023-09-07T18:22:44.389703417Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/utils/functional.py", line 268, in inner
2023-09-07T18:22:44.389715021Z     return func(_wrapped, *args)
2023-09-07T18:22:44.389726159Z   File "/usr/local/lib/python3.10/contextlib.py", line 79, in inner
2023-09-07T18:22:44.389737401Z     return func(*args, **kwds)
2023-09-07T18:22:44.389748658Z   File "/opt/recipes/venv/lib/python3.10/site-packages/annoying/fields.py", line 36, in __get__
2023-09-07T18:22:44.389760125Z     .__get__(instance, instance_type)
2023-09-07T18:22:44.389771330Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 452, in __get__
2023-09-07T18:22:44.389783990Z     rel_obj = self.get_queryset(instance=instance).get(**filter_args)
2023-09-07T18:22:44.389795394Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 646, in get
2023-09-07T18:22:44.389807201Z     num = len(clone)
2023-09-07T18:22:44.389826325Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 376, in __len__
2023-09-07T18:22:44.389838284Z     self._fetch_all()
2023-09-07T18:22:44.389849362Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1867, in _fetch_all
2023-09-07T18:22:44.389860648Z     self._result_cache = list(self._iterable_class(self))
2023-09-07T18:22:44.389871788Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/query.py", line 87, in __iter__
2023-09-07T18:22:44.389883201Z     results = compiler.execute_sql(
2023-09-07T18:22:44.389894305Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1398, in execute_sql
2023-09-07T18:22:44.389905788Z     cursor.execute(sql, params)
2023-09-07T18:22:44.389917059Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 102, in execute
2023-09-07T18:22:44.389928809Z     return super().execute(sql, params)
2023-09-07T18:22:44.389940186Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute
2023-09-07T18:22:44.389951945Z     return self._execute_with_wrappers(
2023-09-07T18:22:44.389963396Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
2023-09-07T18:22:44.389975246Z     return executor(sql, params, many, context)
2023-09-07T18:22:44.389986453Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute
2023-09-07T18:22:44.389998052Z     with self.db.wrap_database_errors:
2023-09-07T18:22:44.390009241Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__
2023-09-07T18:22:44.390020810Z     raise dj_exc_value.with_traceback(traceback) from exc_value
2023-09-07T18:22:44.390032246Z   File "/opt/recipes/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
2023-09-07T18:22:44.390044081Z     return self.cursor.execute(sql, params)
2023-09-07T18:22:44.390055257Z django.db.utils.ProgrammingError: column cookbook_userpreference.show_step_ingredients does not exist
2023-09-07T18:22:44.390066628Z LINE 1: ...market", "cookbook_userpreference"."left_handed", "cookbook_...
2023-09-07T18:22:44.390078049Z                                                              ^
2023-09-07T18:22:44.390089141Z 
2023-09-07T18:22:44.392850694Z 172.20.0.4 - - [07/Sep/2023:20:22:44 +0200] "GET / HTTP/1.0" 500 158110 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"
2023-09-07T18:22:44.737589945Z Not Found: /favicon.ico
2023-09-07T18:22:44.737795401Z Not Found: /favicon.ico

db:

PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-09-07 18:21:47.866 UTC [1] LOG:  starting PostgreSQL 15.4 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
2023-09-07 18:21:47.873 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-09-07 18:21:47.873 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2023-09-07 18:21:47.875 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-09-07 18:21:47.900 UTC [24] LOG:  database system was shut down at 2023-09-07 18:21:41 UTC
2023-09-07 18:21:47.926 UTC [1] LOG:  database system is ready to accept connections
2023-09-07 18:22:44.107 UTC [35] ERROR:  column cookbook_userpreference.show_step_ingredients does not exist at character 809
2023-09-07 18:22:44.107 UTC [35] STATEMENT:  SELECT "cookbook_userpreference"."user_id", "cookbook_userpreference"."image_id", "cookbook_userpreference"."theme", "cookbook_userpreference"."nav_color", "cookbook_userpreference"."default_unit", "cookbook_userpreference"."use_fractions", "cookbook_userpreference"."use_kj", "cookbook_userpreference"."default_page", "cookbook_userpreference"."ingredient_decimals", "cookbook_userpreference"."comments", "cookbook_userpreference"."shopping_auto_sync", "cookbook_userpreference"."sticky_navbar", "cookbook_userpreference"."mealplan_autoadd_shopping", "cookbook_userpreference"."mealplan_autoexclude_onhand", "cookbook_userpreference"."mealplan_autoinclude_related", "cookbook_userpreference"."shopping_add_onhand", "cookbook_userpreference"."filter_to_supermarket", "cookbook_userpreference"."left_handed", "cookbook_userpreference"."show_step_ingredients", "cookbook_userpreference"."default_delay", "cookbook_userpreference"."shopping_recent_days", "cookbook_userpreference"."csv_delim", "cookbook_userpreference"."csv_prefix", "cookbook_userpreference"."created_at" FROM "cookbook_userpreference" WHERE "cookbook_userpreference"."user_id" = 1 LIMIT 21
2023-09-07 18:22:44.299 UTC [35] ERROR:  column cookbook_userpreference.show_step_ingredients does not exist at character 809
2023-09-07 18:22:44.299 UTC [35] STATEMENT:  SELECT "cookbook_userpreference"."user_id", "cookbook_userpreference"."image_id", "cookbook_userpreference"."theme", "cookbook_userpreference"."nav_color", "cookbook_userpreference"."default_unit", "cookbook_userpreference"."use_fractions", "cookbook_userpreference"."use_kj", "cookbook_userpreference"."default_page", "cookbook_userpreference"."ingredient_decimals", "cookbook_userpreference"."comments", "cookbook_userpreference"."shopping_auto_sync", "cookbook_userpreference"."sticky_navbar", "cookbook_userpreference"."mealplan_autoadd_shopping", "cookbook_userpreference"."mealplan_autoexclude_onhand", "cookbook_userpreference"."mealplan_autoinclude_related", "cookbook_userpreference"."shopping_add_onhand", "cookbook_userpreference"."filter_to_supermarket", "cookbook_userpreference"."left_handed", "cookbook_userpreference"."show_step_ingredients", "cookbook_userpreference"."default_delay", "cookbook_userpreference"."shopping_recent_days", "cookbook_userpreference"."csv_delim", "cookbook_userpreference"."csv_prefix", "cookbook_userpreference"."created_at" FROM "cookbook_userpreference" LIMIT 21
2023-09-07 18:22:44.300 UTC [35] ERROR:  column cookbook_userpreference.show_step_ingredients does not exist at character 809
2023-09-07 18:22:44.300 UTC [35] STATEMENT:  SELECT "cookbook_userpreference"."user_id", "cookbook_userpreference"."image_id", "cookbook_userpreference"."theme", "cookbook_userpreference"."nav_color", "cookbook_userpreference"."default_unit", "cookbook_userpreference"."use_fractions", "cookbook_userpreference"."use_kj", "cookbook_userpreference"."default_page", "cookbook_userpreference"."ingredient_decimals", "cookbook_userpreference"."comments", "cookbook_userpreference"."shopping_auto_sync", "cookbook_userpreference"."sticky_navbar", "cookbook_userpreference"."mealplan_autoadd_shopping", "cookbook_userpreference"."mealplan_autoexclude_onhand", "cookbook_userpreference"."mealplan_autoinclude_related", "cookbook_userpreference"."shopping_add_onhand", "cookbook_userpreference"."filter_to_supermarket", "cookbook_userpreference"."left_handed", "cookbook_userpreference"."show_step_ingredients", "cookbook_userpreference"."default_delay", "cookbook_userpreference"."shopping_recent_days", "cookbook_userpreference"."csv_delim", "cookbook_userpreference"."csv_prefix", "cookbook_userpreference"."created_at" FROM "cookbook_userpreference" WHERE "cookbook_userpreference"."user_id" = 1 LIMIT 21
2023-09-07 18:22:44.302 UTC [35] ERROR:  column cookbook_userpreference.show_step_ingredients does not exist at character 809
2023-09-07 18:22:44.302 UTC [35] STATEMENT:  SELECT "cookbook_userpreference"."user_id", "cookbook_userpreference"."image_id", "cookbook_userpreference"."theme", "cookbook_userpreference"."nav_color", "cookbook_userpreference"."default_unit", "cookbook_userpreference"."use_fractions", "cookbook_userpreference"."use_kj", "cookbook_userpreference"."default_page", "cookbook_userpreference"."ingredient_decimals", "cookbook_userpreference"."comments", "cookbook_userpreference"."shopping_auto_sync", "cookbook_userpreference"."sticky_navbar", "cookbook_userpreference"."mealplan_autoadd_shopping", "cookbook_userpreference"."mealplan_autoexclude_onhand", "cookbook_userpreference"."mealplan_autoinclude_related", "cookbook_userpreference"."shopping_add_onhand", "cookbook_userpreference"."filter_to_supermarket", "cookbook_userpreference"."left_handed", "cookbook_userpreference"."show_step_ingredients", "cookbook_userpreference"."default_delay", "cookbook_userpreference"."shopping_recent_days", "cookbook_userpreference"."csv_delim", "cookbook_userpreference"."csv_prefix", "cookbook_userpreference"."created_at" FROM "cookbook_userpreference" WHERE "cookbook_userpreference"."user_id" = 1 LIMIT 21
2023-09-07 18:22:44.304 UTC [35] ERROR:  column cookbook_userpreference.show_step_ingredients does not exist at character 809
2023-09-07 18:22:44.304 UTC [35] STATEMENT:  SELECT "cookbook_userpreference"."user_id", "cookbook_userpreference"."image_id", "cookbook_userpreference"."theme", "cookbook_userpreference"."nav_color", "cookbook_userpreference"."default_unit", "cookbook_userpreference"."use_fractions", "cookbook_userpreference"."use_kj", "cookbook_userpreference"."default_page", "cookbook_userpreference"."ingredient_decimals", "cookbook_userpreference"."comments", "cookbook_userpreference"."shopping_auto_sync", "cookbook_userpreference"."sticky_navbar", "cookbook_userpreference"."mealplan_autoadd_shopping", "cookbook_userpreference"."mealplan_autoexclude_onhand", "cookbook_userpreference"."mealplan_autoinclude_related", "cookbook_userpreference"."shopping_add_onhand", "cookbook_userpreference"."filter_to_supermarket", "cookbook_userpreference"."left_handed", "cookbook_userpreference"."show_step_ingredients", "cookbook_userpreference"."default_delay", "cookbook_userpreference"."shopping_recent_days", "cookbook_userpreference"."csv_delim", "cookbook_userpreference"."csv_prefix", "cookbook_userpreference"."created_at" FROM "cookbook_userpreference" WHERE "cookbook_userpreference"."user_id" = 1 LIMIT 21
2023-09-07 18:22:44.305 UTC [35] ERROR:  column cookbook_userpreference.show_step_ingredients does not exist at character 809
2023-09-07 18:22:44.305 UTC [35] STATEMENT:  SELECT "cookbook_userpreference"."user_id", "cookbook_userpreference"."image_id", "cookbook_userpreference"."theme", "cookbook_userpreference"."nav_color", "cookbook_userpreference"."default_unit", "cookbook_userpreference"."use_fractions", "cookbook_userpreference"."use_kj", "cookbook_userpreference"."default_page", "cookbook_userpreference"."ingredient_decimals", "cookbook_userpreference"."comments", "cookbook_userpreference"."shopping_auto_sync", "cookbook_userpreference"."sticky_navbar", "cookbook_userpreference"."mealplan_autoadd_shopping", "cookbook_userpreference"."mealplan_autoexclude_onhand", "cookbook_userpreference"."mealplan_autoinclude_related", "cookbook_userpreference"."shopping_add_onhand", "cookbook_userpreference"."filter_to_supermarket", "cookbook_userpreference"."left_handed", "cookbook_userpreference"."show_step_ingredients", "cookbook_userpreference"."default_delay", "cookbook_userpreference"."shopping_recent_days", "cookbook_userpreference"."csv_delim", "cookbook_userpreference"."csv_prefix", "cookbook_userpreference"."created_at" FROM "cookbook_userpreference" WHERE "cookbook_userpreference"."user_id" = 1 LIMIT 21

nginx:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/09/07 18:21:49 [notice] 1#1: using the "epoll" event method
2023/09/07 18:21:49 [notice] 1#1: nginx/1.25.2
2023/09/07 18:21:49 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10) 
2023/09/07 18:21:49 [notice] 1#1: OS: Linux 6.2.16-4-pve
2023/09/07 18:21:49 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1024:524288
2023/09/07 18:21:49 [notice] 1#1: start worker processes
2023/09/07 18:21:49 [notice] 1#1: start worker process 20
192.168.178.121 - - [07/Sep/2023:18:22:44 +0000] "GET / HTTP/1.1" 500 158110 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
192.168.178.121 - - [07/Sep/2023:18:22:44 +0000] "GET /favicon.ico HTTP/1.1" 499 0 "http://192.168.178.24/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0" "-"
smilerz commented 1 year ago

do you have the ability to modify the database directly? You are missing a migration.

johndoe0815 commented 1 year ago

Not sure, at least not the knowledge ;-) Should the database be migrated by just pulling the most recent docker images? Then there seems to be a bug. As a workaround, a fresh install of 1.5.6 should work, if I there just reimport the recipes that I export in 1.5.5 before?

smilerz commented 1 year ago

no bug - not sure how your migrations got out of sync. Did you run the develop branch at some point?

I'm investigating if there is a failsafe way to reconstruct the database. I'll report back once I find something.

smilerz commented 1 year ago

Can you run the command below from the machine running docker?

docker exec -it recipes venv/bin/python manage.py migrate cookbook 0197

followed by

docker exec -it recipes venv/bin/python manage.py migrate

johndoe0815 commented 1 year ago

No develop branch. Fresh install of 1.5.4, redeployed with 1.5.5 successfully, 1.5.6 fails now.

I have a stack tandoor, and in that there are three containers: grafik

With your command on the host, it says Error response from daemon: No such container: recipes

smilerz commented 1 year ago

Replace "recipes" with the name of the web container.

johndoe0815 commented 1 year ago

Thanks, that seems to have worked.

tandoortest:/# docker exec -it tandoor-web_recipes-1 venv/bin/python manage.py migrate cookbook 0197
DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
Operations to perform:
  Target specific migration: 0197_step_show_ingredients_table_and_more, from cookbook
Running migrations:
  Rendering model states... DONE
  Unapplying cookbook.0199_alter_propertytype_options_alter_automation_type_and_more... OK
  Unapplying cookbook.0198_propertytype_order... OK
tandoortest:/# docker exec -it tandoor-web_recipes-1 venv/bin/python manage.py migrate
DEPRECATION WARNING: Environment var "REVERSE_PROXY_AUTH" is deprecated. Please use "REMOTE_USER_AUTH".
Operations to perform:
  Apply all migrations: account, admin, auth, authtoken, contenttypes, cookbook, oauth2_provider, sessions, sites, socialaccount
Running migrations:
  Applying cookbook.0198_propertytype_order... OK
  Applying cookbook.0199_alter_propertytype_options_alter_automation_type_and_more... OK

I can access tandoor again without any error message.

Version number under system is still not displayed (initial post) and I don't think that I am on a development branch?! grafik

smilerz commented 1 year ago

Glad it's working now. Not sure about the version number, I suspect it's transient.