Bug type
Generation bug (slides/content incorrect)
Summary
OSError: File name too long when generating presentations in Japanese
When generating a presentation with a Japanese theme, Presenton's internal LLM appends slide description text to the file name, causing the full path to exceed the OS file name length limit (255 bytes). This results in a 500 error during export.
Steps to reproduce
- Send a POST request to /api/v1/ppt/presentation/generate with a short Japanese theme
Example: {"content": "AI活用", "n_slides": 8, "language": "Japanese"}
- Presenton's internal LLM generates a title and appends description text to the file name
- Export fails with OSError: [Errno 36] File name too long
Expected behavior
The exported PPTX file name should be based only on the presentation title, truncated to a safe length within OS limits.
Actual behavior
The file name includes the title plus appended description text, exceeding the OS limit.
OSError: [Errno 36] File name too long:
'/app_data/exports/2026下半期営業戦略 2026年度下半期の営業戦略と具体的な目標を提示します。
市場環境の変化に対応し、持続的な成長を実現するための行動計画について議論します。特に、データに基づい.pptx'
Presenton version
0.7.0-beta
Operating system
Windows 11
How are you running Presenton?
Docker
LLM provider
Google Gemini
Logs / screenshots
File "/usr/local/lib/python3.11/zipfile.py", line 1311, in __init__
self.fp = io.open(file, filemode)
OSError: [Errno 36] File name too long: '/app_data/exports/2026下半期営業戦略 2026年度下半期の営業戦略と具体的な目標を提示します。市場環境の変化に対応し、持続的な成長を実現するための行動計画について議論します。特に、データに基づい.pptx'
fastapi.exceptions.HTTPException: 500: Presentation generation failed
Impact
Presentations cannot be generated reliably when using Japanese (or potentially other multi-byte languages).
The bug occurs unpredictably depending on what description text the internal LLM generates. This makes the API unusable for Japanese business users.
Additional information
Root cause appears to be in export_utils.py — the file name is constructed by combining the title with description text generated by the internal LLM, without enforcing a maximum byte length.
Suggested fix: Truncate the file name to a safe byte length (e.g. 200 bytes) before passing to the file system.
Note that multi-byte characters (Japanese, Chinese, etc.) consume 3 bytes per character in UTF-8, so character count alone is insufficient.
Bug type
Generation bug (slides/content incorrect)
Summary
OSError: File name too long when generating presentations in Japanese
When generating a presentation with a Japanese theme, Presenton's internal LLM appends slide description text to the file name, causing the full path to exceed the OS file name length limit (255 bytes). This results in a 500 error during export.
Steps to reproduce
Example: {"content": "AI活用", "n_slides": 8, "language": "Japanese"}
Expected behavior
The exported PPTX file name should be based only on the presentation title, truncated to a safe length within OS limits.
Actual behavior
The file name includes the title plus appended description text, exceeding the OS limit.
OSError: [Errno 36] File name too long:
'/app_data/exports/2026下半期営業戦略 2026年度下半期の営業戦略と具体的な目標を提示します。
市場環境の変化に対応し、持続的な成長を実現するための行動計画について議論します。特に、データに基づい.pptx'
Presenton version
0.7.0-beta
Operating system
Windows 11
How are you running Presenton?
Docker
LLM provider
Google Gemini
Logs / screenshots
Impact
Presentations cannot be generated reliably when using Japanese (or potentially other multi-byte languages).
The bug occurs unpredictably depending on what description text the internal LLM generates. This makes the API unusable for Japanese business users.
Additional information
Root cause appears to be in export_utils.py — the file name is constructed by combining the title with description text generated by the internal LLM, without enforcing a maximum byte length.
Suggested fix: Truncate the file name to a safe byte length (e.g. 200 bytes) before passing to the file system.
Note that multi-byte characters (Japanese, Chinese, etc.) consume 3 bytes per character in UTF-8, so character count alone is insufficient.