What changed in this round

The web errors were mostly reduced, but the generated slides still did not behave like a real product. The biggest issues moved from server crashes to content mapping and layout quality.

Credential mismatch

One error appeared when opening the result page:

FileNotFoundError: [Errno 2] No such file or directory: 'credentials.json'

The cause was inconsistent authentication code. The prompt flow used OAuth through token.json, but the result and download views still expected an older service-account style credentials.json.

The fix was to make the result and download views use the same authentication path as the generation flow.

Template text not changing

Another issue was that some slides still looked like the original template. That meant the code was creating or opening the presentation, but not replacing the intended text boxes.

The fix required checking how Google Slides exposes page elements and making the replacement logic target the actual placeholders rather than assuming a simple text order.

Layout breakage

The deeper problem was that text replacement by sequence is fragile. If the code does not know which element is a title, subtitle, or body field, generated content can land in the wrong box.

The next design direction became clear:

  • Read placeholder metadata.
  • Separate title and body content.
  • Map generated text by role, not by raw order.
  • Keep slide structure explicit in the code.

This round turned the project from “generate text and push it into slides” into “understand the template before filling it.”