-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: "Failed to parse PS1 metadata" on empty command #6826
Labels
bug
Something isn't working
openhands
Have Openhands attempt to fix the issue (via GH App)
terminal/commands
Related to the terminal or OpenHands running commands
Comments
I'm working on a fix! neubig can track my progress at all-hands.dev |
neubig
pushed a commit
that referenced
this issue
Feb 19, 2025
- Add .replace(r'"', '"') to unescape quotes before parsing JSON in matches_ps1_metadata and from_ps1_match - Add test to verify PS1 metadata parsing works correctly - Fixes #6826
neubig
pushed a commit
that referenced
this issue
Feb 19, 2025
The issue was not with escaped quotes, but with backslashes in the JSON values being treated as literal backslashes. Fixed by properly escaping them with double backslashes. Fixes #6826
neubig
pushed a commit
that referenced
this issue
Feb 19, 2025
- Rename test to test_empty_command_ps1_metadata to reflect its purpose - Add test case with empty command to match the actual issue - Add better assertions for backslash handling - Add docstring explaining the test's purpose Part of #6826
neubig
pushed a commit
that referenced
this issue
Feb 19, 2025
- Rename test to test_empty_command_ps1_metadata to reflect its purpose - Add test case with empty command to match the actual issue - Add better assertions for backslash handling - Add docstring explaining the test's purpose Part of #6826
neubig
pushed a commit
that referenced
this issue
Feb 19, 2025
- Rename test to test_empty_command_ps1_metadata to reflect its purpose - Add test case with empty command to match the actual issue - Add better assertions for backslash handling - Add docstring explaining the test's purpose Part of #6826
neubig
pushed a commit
that referenced
this issue
Feb 19, 2025
- Rename test to test_empty_command_ps1_metadata to reflect its purpose - Add test case with empty command to match the actual issue - Add better assertions for backslash handling - Add docstring explaining the test's purpose Part of #6826
neubig
pushed a commit
that referenced
this issue
Feb 19, 2025
- Use raw strings for backslash sequences in PS1 metadata - Remove unnecessary quote escaping since json.dumps already handles it - Add tests to verify PS1 metadata parsing works correctly - Fixes #6826
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
openhands
Have Openhands attempt to fix the issue (via GH App)
terminal/commands
Related to the terminal or OpenHands running commands
Is there an existing issue for the same bug?
Describe the bug and reproduction steps
I got an error when OpenHands tried to send an empty command:
Here is the log that I got:
It would be good if we could write a test to check if this parsing works when OpenHands sends an empty command.
OpenHands Installation
app.all-hands.dev
OpenHands Version
0.24.0
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response
The text was updated successfully, but these errors were encountered: