Fix Issue #359: Unable to take input through CLI or terminal#417
Open
muien5080 wants to merge 1 commit intoJdeRobot:masterfrom
Open
Fix Issue #359: Unable to take input through CLI or terminal#417muien5080 wants to merge 1 commit intoJdeRobot:masterfrom
muien5080 wants to merge 1 commit intoJdeRobot:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#359 Fixed
Fixes the EOFError crash that occurs when synthesized code blocks use
input()to get user input from the terminal.
Problem
When user code blocks call
input(), the program crashes with:This happens because synthesized code runs in subprocess contexts where stdin
is not connected to the terminal.
Solution
Added a simple input wrapper in
main()that:EOFErrorfrominput()calls""instead of crashingChanges
backend/staticfiles/synthesis/main.pymain()Testing
User code blocks can now safely use
input()without crashing in subprocess contexts.AI Assistance
This pull request (PR) was enhanced with the assistance of AI tools like ChatGPT. AI helped with code review, suggesting an appropriate branch name, and optimizing the design of the PR description.
---Note---
I've worked on this independently and am interested in contributing to JdeRobot.
I'm willing to participate in GSoC 2026 and would appreciate the opportunity
to collaborate with this amazing project.