Skip to content

FileNotFoundError when generating Google AI payload: missing payloads/ directory #65

@epikurus

Description

@epikurus

During Genre Mix AI curation using the Google provider, the process fails with a FileNotFoundError when attempting to write the request payload to disk. The code tries to open a file under payloads/, but the directory does not exist at runtime.

Using AI model: gemini-2.5-flash (from google provider)
Using index-based approach for 225 tracks
Unexpected error in Genre Mix AI curation: [Errno 2] No such file or directory: 'payloads/google_ai_payload_1766573763.json'
Traceback (most recent call last):
  File "/app/backend/ai_client.py", line 805, in curate_genre_mix
    content = await self.provider.generate(
  File "/app/backend/services/ai_providers.py", line 61, in generate
    return await self._generate_google(system_prompt, user_prompt, max_tokens, temperature)
  File "/app/backend/services/ai_providers.py", line 206, in _generate_google
    with open(payload_file, 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'payloads/google_ai_payload_1766573763.json'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions