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] - OpenAI "Create Recipe from an Image" stopped working #4802

Open
5 of 6 tasks
buhnux opened this issue Dec 31, 2024 · 0 comments
Open
5 of 6 tasks

[BUG] - OpenAI "Create Recipe from an Image" stopped working #4802

buhnux opened this issue Dec 31, 2024 · 0 comments
Labels
bug Something isn't working triage

Comments

@buhnux
Copy link

buhnux commented Dec 31, 2024

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • 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?

A month or so ago I setup OpenAI and it was working, and I'm unable to figure out why it stopped working. When I try to create a recipe from an image, I get an error "something went wrong" from the webpage.

Steps to Reproduce

  1. enable openai
  2. upload image to recipe

Please provide relevant logs

root@jupiter:/docker/mealie# podman-compose logs
88ee6dd811d6 usermod: no changes
88ee6dd811d6 Switching to dedicated user
88ee6dd811d6
88ee6dd811d6 User uid: 911
88ee6dd811d6 User gid: 911
88ee6dd811d6
88ee6dd811d6 /app/mealie/repos/repository_cookbooks.py:39: SyntaxWarning: invalid escape sequence '\d'
88ee6dd811d6 if not (data.slug and re.match(f"^({new_slug})(-\d+)?$", data.slug)):
88ee6dd811d6 /app/mealie/schema/response/query_search.py:19: SyntaxWarning: invalid escape sequence '#'
88ee6dd811d6 punctuation = "!#$%&()+,-./:;<=>?@[\]^_`{|}~" # string.punctuation with ' & " removed
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Started server process [1]
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Waiting for application startup.
88ee6dd811d6 INFO 2024-12-30T15:30:52 - start: database initialization
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Database connection established.
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Context impl PostgresqlImpl.
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Will assume transactional DDL.
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Checking for migration data fixes
88ee6dd811d6 INFO 2024-12-30T15:30:52 - end: database initialization
88ee6dd811d6 INFO 2024-12-30T15:30:52 - -----SYSTEM STARTUP-----
88ee6dd811d6 INFO 2024-12-30T15:30:52 - ------APP SETTINGS------
88ee6dd811d6 INFO 2024-12-30T15:30:52 - {
88ee6dd811d6 "TESTING": false,
88ee6dd811d6 "PRODUCTION": true,
88ee6dd811d6 "LOG_CONFIG_OVERRIDE": null,
88ee6dd811d6 "LOG_LEVEL": "info",
88ee6dd811d6 "theme": {
88ee6dd811d6 "light_primary": "#E58325",
88ee6dd811d6 "light_accent": "#007A99",
88ee6dd811d6 "light_secondary": "#973542",
88ee6dd811d6 "light_success": "#43A047",
88ee6dd811d6 "light_info": "#1976D2",
88ee6dd811d6 "light_warning": "#FF6D00",
88ee6dd811d6 "light_error": "#EF5350",
88ee6dd811d6 "dark_primary": "#E58325",
88ee6dd811d6 "dark_accent": "#007A99",
88ee6dd811d6 "dark_secondary": "#973542",
88ee6dd811d6 "dark_success": "#43A047",
88ee6dd811d6 "dark_info": "#1976D2",
88ee6dd811d6 "dark_warning": "#FF6D00",
88ee6dd811d6 "dark_error": "#EF5350"
88ee6dd811d6 },
88ee6dd811d6 "BASE_URL": "http://mealie",
88ee6dd811d6 "STATIC_FILES": "/spa/static",
88ee6dd811d6 "IS_DEMO": false,
88ee6dd811d6 "HOST_IP": "
",
88ee6dd811d6 "API_HOST": "0.0.0.0",
88ee6dd811d6 "API_PORT": 9000,
88ee6dd811d6 "API_DOCS": true,
88ee6dd811d6 "TOKEN_TIME": 48,
88ee6dd811d6 "GIT_COMMIT_HASH": "2922782e5ea44e1c5d2690c9aea84134a044a7cc",
88ee6dd811d6 "ALLOW_SIGNUP": false,
88ee6dd811d6 "DAILY_SCHEDULE_TIME": "23:45",
88ee6dd811d6 "SECURITY_MAX_LOGIN_ATTEMPTS": 5,
88ee6dd811d6 "SECURITY_USER_LOCKOUT_TIME": 24,
88ee6dd811d6 "DB_ENGINE": "postgres",
88ee6dd811d6 "DEFAULT_GROUP": "Home",
88ee6dd811d6 "DEFAULT_HOUSEHOLD": "Family",
88ee6dd811d6 "SMTP_HOST": null,
88ee6dd811d6 "SMTP_PORT": "587",
88ee6dd811d6 "SMTP_FROM_NAME": "Mealie",
88ee6dd811d6 "SMTP_FROM_EMAIL": null,
88ee6dd811d6 "SMTP_USER": null,
88ee6dd811d6 "SMTP_PASSWORD": null,
88ee6dd811d6 "SMTP_AUTH_STRATEGY": "TLS",
88ee6dd811d6 "LDAP_AUTH_ENABLED": false,
88ee6dd811d6 "LDAP_SERVER_URL": null,
88ee6dd811d6 "LDAP_TLS_INSECURE": false,
88ee6dd811d6 "LDAP_TLS_CACERTFILE": null,
88ee6dd811d6 "LDAP_ENABLE_STARTTLS": false,
88ee6dd811d6 "LDAP_BASE_DN": null,
88ee6dd811d6 "LDAP_QUERY_BIND": null,
88ee6dd811d6 "LDAP_QUERY_PASSWORD": null,
88ee6dd811d6 "LDAP_USER_FILTER": null,
88ee6dd811d6 "LDAP_ADMIN_FILTER": null,
88ee6dd811d6 "LDAP_ID_ATTRIBUTE": "uid",
88ee6dd811d6 "LDAP_MAIL_ATTRIBUTE": "mail",
88ee6dd811d6 "LDAP_NAME_ATTRIBUTE": "name",
88ee6dd811d6 "OIDC_AUTH_ENABLED": false,
88ee6dd811d6 "OIDC_CLIENT_ID": null,
88ee6dd811d6 "OIDC_CLIENT_SECRET": null,
88ee6dd811d6 "OIDC_CONFIGURATION_URL": null,
88ee6dd811d6 "OIDC_SIGNUP_ENABLED": true,
88ee6dd811d6 "OIDC_USER_GROUP": null,
88ee6dd811d6 "OIDC_ADMIN_GROUP": null,
88ee6dd811d6 "OIDC_AUTO_REDIRECT": false,
88ee6dd811d6 "OIDC_PROVIDER_NAME": "OAuth",
88ee6dd811d6 "OIDC_REMEMBER_ME": false,
88ee6dd811d6 "OIDC_USER_CLAIM": "email",
88ee6dd811d6 "OIDC_NAME_CLAIM": "name",
88ee6dd811d6 "OIDC_GROUPS_CLAIM": "groups",
88ee6dd811d6 "OIDC_SCOPES_OVERRIDE": null,
88ee6dd811d6 "OIDC_TLS_CACERTFILE": null,
88ee6dd811d6 "OPENAI_BASE_URL": null,
88ee6dd811d6 "OPENAI_API_KEY": "*****",
88ee6dd811d6 "OPENAI_MODEL": "gpt-4o",
88ee6dd811d6 "OPENAI_CUSTOM_HEADERS": {},
88ee6dd811d6 "OPENAI_CUSTOM_PARAMS": {},
88ee6dd811d6 "OPENAI_ENABLE_IMAGE_SERVICES": true,
88ee6dd811d6 "OPENAI_WORKERS": 2,
88ee6dd811d6 "OPENAI_SEND_DATABASE_DATA": true,
88ee6dd811d6 "OPENAI_REQUEST_TIMEOUT": 60,
88ee6dd811d6 "WORKER_PER_CORE": 1,
88ee6dd811d6 "UVICORN_WORKERS": 1,
88ee6dd811d6 "TLS_CERTIFICATE_PATH": null,
88ee6dd811d6 "TLS_PRIVATE_KEY_PATH": null
88ee6dd811d6 }
88ee6dd811d6 INFO 2024-12-30T15:30:52 - ------APP FEATURES------
88ee6dd811d6 INFO 2024-12-30T15:30:52 - --------==SMTP==--------
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Enabled: False
88ee6dd811d6 Reason: Missing required values for ['SMTP_HOST', 'SMTP_FROM_EMAIL']
88ee6dd811d6 INFO 2024-12-30T15:30:52 - --------==LDAP==--------
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Enabled: False
88ee6dd811d6 Reason: LDAP_AUTH_ENABLED is false
88ee6dd811d6 INFO 2024-12-30T15:30:52 - --------==OIDC==--------
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Enabled: False
88ee6dd811d6 Reason: OIDC_AUTH_ENABLED is false
88ee6dd811d6 INFO 2024-12-30T15:30:52 - -------==OPENAI==-------
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Enabled: True
88ee6dd811d6 INFO 2024-12-30T15:30:52 - ------------------------
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Daily tasks scheduled for 2024-12-31 08:45:00+00:00
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Application startup complete.
88ee6dd811d6 INFO 2024-12-30T15:30:52 - Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
88ee6dd811d6 INFO 2024-12-30T15:31:08 - [192.168.86.240:53516] 307 Temporary Redirect "GET /admin/site-settings HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:08 - [192.168.86.240:53516] 200 OK "GET /admin/site-settings/ HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:08 - [192.168.86.240:53516] 200 OK "GET /_nuxt/a367c2b.js HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:09 - [192.168.86.240:53516] 200 OK "GET /_nuxt/5087f04.js HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:09 - [192.168.86.240:53516] 200 OK "GET /api/users/self HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:09 - [192.168.86.240:53516] 200 OK "GET /api/groups/members?page=1&perPage=-1&orderBy=full_name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:09 - [192.168.86.240:53517] 200 OK "GET /api/admin/about HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:09 - [192.168.86.240:53518] 200 OK "GET /api/admin/about/check HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:13 - [192.168.86.240:53518] 200 OK "GET /_nuxt/b2fbcb6.js HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:13 - [192.168.86.240:53517] 200 OK "GET /_nuxt/3b19f0a.js HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:13 - [192.168.86.240:53516] 200 OK "GET /_nuxt/4f14006.js HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:14 - [192.168.86.240:53516] 200 OK "GET /api/users?page=1&perPage=-1 HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:14 - [192.168.86.240:53517] 200 OK "GET /api/admin/households?page=1&perPage=-1&orderBy=name%2C+group.name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:14 - [192.168.86.240:53518] 200 OK "GET /api/admin/groups?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53518] 200 OK "GET /api/users/self HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53517] 200 OK "GET /api/app/about/startup-info HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53518] 200 OK "GET /api/app/about HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53518] 200 OK "GET /api/households/self HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53516] 200 OK "GET /api/groups/households?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53522] 200 OK "GET /api/organizers/categories?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53521] 200 OK "GET /api/groups/members?page=1&perPage=-1&orderBy=full_name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53520] 200 OK "GET /api/app/about HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53517] 200 OK "GET /api/households/cookbooks?page=1&perPage=-1&orderBy=position&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53516] 200 OK "GET /api/organizers/tags?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53521] 200 OK "GET /api/organizers/tools?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53522] 200 OK "GET /api/recipes?page=1&perPage=64&orderBy=created_at&orderDirection=desc&paginationSeed=1735605076708&searchSeed=1735605076708&search=&requireAllCategories=false&requireAllTags=false&requireAllTools=false&requireAllFoods=false HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53518] 200 OK "GET /api/foods?page=1&perPage=-1&orderBy=name&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53518] 200 OK "GET /api/users/self/ratings HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:16 - [192.168.86.240:53522] 200 OK "GET /api/households/recipe-actions?page=1&perPage=-1&orderBy=title&orderDirection=asc HTTP/1.1"
88ee6dd811d6 INFO 2024-12-30T15:31:19 - [192.168.86.240:53522] 200 OK "GET /api/app/about HTTP/1.1"
b25ff6172740
b25ff6172740 PostgreSQL Database directory appears to contain a database; Skipping initialization
b25ff6172740
b25ff6172740 2024-12-31 00:30:42.440 UTC [1] LOG: starting PostgreSQL 15.10 (Debian 15.10-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
b25ff6172740 2024-12-31 00:30:42.440 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
b25ff6172740 2024-12-31 00:30:42.440 UTC [1] LOG: listening on IPv6 address "::", port 5432
b25ff6172740 2024-12-31 00:30:42.454 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
b25ff6172740 2024-12-31 00:30:42.473 UTC [24] LOG: database system was shut down at 2024-12-31 00:30:17 UTC
b25ff6172740 2024-12-31 00:30:42.505 UTC [1] LOG: database system is ready to accept connections
b25ff6172740 2024-12-31 00:30:42.518 UTC [31] FATAL: role "root" does not exist
b25ff6172740 2024-12-31 00:31:13.576 UTC [37] FATAL: role "root" does not exist
b25ff6172740 2024-12-31 00:31:44.573 UTC [47] FATAL: role "root" does not exist
b25ff6172740 2024-12-31 00:32:15.559 UTC [51] FATAL: role "root" does not exist
b25ff6172740 2024-12-31 00:32:46.557 UTC [56] FATAL: role "root" does not exist
root@jupiter:/docker/mealie#

Mealie Version

v2.3.0, v2.4.1

Deployment

Docker (Linux)

Additional Deployment Details

services:
mealie:
image: ghcr.io/mealie-recipes/mealie:latest
hostname: mealie
container_name: mealie
restart: always
ports:
- "192.168.50.2:80:9000" #
volumes:
- ./mealie-data:/app/data/
environment:
# Set Backend ENV Variables Here
ALLOW_SIGNUP: "false"
OPENAI_API_KEY: "MY_KEY"
OPEN_AI_ENABLE_IMAGE_SERVICES: "true"
OPENAI_ENABLE_IMAGE_SERVICES: "true"
PUID: 911
PGID: 911
TZ: America/Anchorage
MAX_WORKERS: 1
WEB_CONCURRENCY: 1
BASE_URL: https://mealie
# Database Settings
DB_ENGINE: postgres
POSTGRES_USER: mealie
POSTGRES_PASSWORD: mealie
POSTGRES_SERVER: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: mealie
mac_address: "00:00:00:01:00:01"
depends_on:
postgres:
condition: service_healthy

postgres:
hostname: postgres
container_name: postgres
image: postgres:15
restart: always
mac_address: "00:00:00:02:00:02"
volumes:
- ./mealie-pgdata:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: mealie
POSTGRES_USER: mealie
healthcheck:
test: ["CMD", "pg_isready"]
interval: 30s
timeout: 20s
retries: 3
ports:
- "5432:5432"

volumes:
mealie-data:
mealie-pgdata:

deploy:
resources:
limits:
memory_swap: 0

@buhnux buhnux added bug Something isn't working triage labels Dec 31, 2024
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

No branches or pull requests

1 participant