IT and development / Asking about errors

You got an error.
Ask AI for the cause
and how to fix it.

Just paste the code, the error message and what the data looks like, as is. An explanation of the cause and a suggested fix come back. The explanation is aimed at programming beginners.

Try it in Prompt Flow Studio
Code provided
My short Python script for adding up totals gave an error. Please tell me the cause and how to fix it. I'm a programming beginner. ```python import csv total = 0 with open("sales.csv", encoding="utf-8") as f: for row in csv.DictReader(f): total += row["price"] print(total) ``` Error: TypeError: unsupported operand type(s) for +=: 'int' and 'str' The price column in sales.csv contains numbers like 1200, but some rows are blank.
Fix returned
Actual Prompt Flow Studio response screen (cause and fix for a Python error)
Actual screen (with Grok Build 0.1 selected) (an example of use)View larger image

Just 3 steps

Open model selection

Go to the selection screen from the model name in the input area or at the top of the chat.

Choose a model

Search for a model name and select it. You can also start with Auto.

Send your request

Paste the code, error message and what the data looks like, then send.

Other uses work the same way

Politely rephrasing a reminder chatHow do you polish a routine message with the model you chose? Planning a new-hire training schedule and budgetHow do you pass schedule and budget conditions together? Headlines and copy with a set lengthHow do you come up with headlines of a specific length?

See all use cases

If you are unsure about the wording, you can also have another AI write it and compare.

For your next error too, just paste it and ask.

Try it in Prompt Flow Studio