Home / Prompts / Troubleshooting
Fix a script that crashes
Run the script, read the error and fix it.
The prompt
Run python3 ~/scripts/report.py. If it fails, read the error, explain it in plain words and fix the cause. Run it again to confirm it works.
What the AI will do
- Runs the script and reads the error.
- Explains the error in plain words and fixes the cause in the code.
- Runs the script again to confirm it works.
On Windows, Mac and Linux
Windows: Python is often started with python or py, not python3, and the path looks like C:\Users\<you>\scripts\report.py. Mac and Linux: python3.
How to use it
- Make sure Shellway is connected in ChatGPT, Claude or Cursor.
- Paste the prompt and change the folder names or paths to match your computer.
- Review the plan your AI shows before you confirm any changes.
Example reply
An illustration of a typical answer. Your AI will show the real files, names and numbers from your computer.
report.py failed: KeyError: 'amount' (line 37). The new CSV export renamed the column to 'Amount'. Fixed: read the column case-insensitively. Ran again: report saved to output/report-november.xlsx (412 rows).
Good to know
Your AI shows its plan before it changes anything, and your rules on the computer still apply: read-only mode, allowed folders and blocked commands, with a backup before each file edit (safety rules). Works in ChatGPT, Claude, Claude Code and Cursor; the free plan gives 50 actions a day (pricing).