-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
Describe the bug
I encountered an error when running interpreter --os on Windows. The error occurs due to an incompatible date format string.
Environment
- OS: Windows
- Python version: 3.11
- open-interpreter version: 0.4.1
Error Message
ValueError: Invalid format string
Error Location
The error occurs in interpreter\computer_use\loop.py, where the date format string uses %-d which is not supported on Windows.
Current code:
datetime.today().strftime('%A, %B %-d, %Y')
## Solution
Changing %-d to %d fixes the issue. This suggests that the code should handle platform-specific date formatting.
## Suggestion
Consider using one of these approaches to fix this cross-platform issue:
Use %d instead of %-d
Add platform-specific handling for date formatting
Use a cross-platform date formatting library
This would improve the Windows user experience with open-interpreter.
### Reproduce
1. Run `pip install open-interpreter`
2. Run `interpreter --os`
3. The error occurs due to incompatible date format string
4. Error message shows: ValueError: Invalid format string
### Expected behavior
The program should start normally without any date format errors when using the --os flag on Windows.
### Screenshots

### Open Interpreter version
0.4.1
### Python version
3.11
### Operating System name and version
Windows 11
### Additional context
_No response_Metadata
Metadata
Assignees
Labels
No labels