Skip to content

fix: replace recursive _traverse_messages with iterative approach to handle deep conversation threads - #235

Merged
groksrc merged 1 commit into
mainfrom
claude/issue-234-20250718-2109
Aug 2, 2025
Merged

groksrc merged 1 commit into
mainfrom
claude/issue-234-20250718-2109

Conversation

@phernandez

Copy link
Copy Markdown
Member

Fixes RecursionError when importing ChatGPT conversations with deep message threads (2,565+ levels). The recursive implementation exceeded Python's default recursion limit, causing imports to fail on long conversations.

The iterative approach uses a stack to process nodes in the same order as the original recursive version, eliminating recursion depth limitations while maintaining identical behavior.

Resolves #234

Generated with Claude Code

…handle deep conversation threads

Fixes RecursionError when importing ChatGPT conversations with deep message
threads (2,565+ levels). The recursive implementation exceeded Python''s default
recursion limit, causing imports to fail on long conversations.

The iterative approach uses a stack to process nodes in the same order as the
original recursive version, eliminating recursion depth limitations while
maintaining identical behavior.

Resolves #234

Co-authored-by: Paul Hernandez <[email protected]>
@groksrc
groksrc merged commit 7585a29 into main Aug 2, 2025
@groksrc
groksrc deleted the claude/issue-234-20250718-2109 branch August 2, 2025 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ChatGPT Importer Fails with RecursionError on Deep Conversation Threads

3 participants