You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] ChatGPT Import Fails on Conversations with Null Titles #451
Bug Description
ChatGPT importer crashes when encountering conversations with null titles in conversations.json, causing entire import to fail.
Steps To Reproduce
Export ChatGPT conversations to conversations.json
Ensure some conversations have "title": null in JSON
Run bm import chatgpt conversations.json --project Life
Import fails with TypeError: expected string or bytes-like object, got 'NoneType'
Expected Behavior
Skip conversations with null titles with warning message
Continue importing valid conversations
Report summary: "X imported, Y skipped"
Actual Behavior
Entire import fails on first null title
No conversations imported
Traceback shown instead of graceful handling
Error Stack
File ".../chatgpt_importer.py", line 97, in _format_chat_content
clean_title = clean_filename(conversation["title"])
File ".../utils.py", line 18, in clean_filename
name = re.sub(r"[\s\-,.:/\\\[\]\(\)]+", "_", name)
TypeError: expected string or bytes-like object, got 'NoneType'
Root Cause clean_filename() doesn't validate input before regex operation
Activity
fix: handle null titles in ChatGPT import