--- title: "Web Scraping Errors: Fix blank records in an agent data collection " slug: "fixing-blank-records-in-an-agent-collection" description: "When you set actions as Optional in the Agent Builder, the agent doesn't see empty items as errors and doesn't attempt to recover the information. If you have an agent that has several items set to Optional, your results can include several incomplete records. Data collection fix" tags: ["resolve", "troubleshoot", "info", "empty", "clean"] updated: 2024-05-14T14:06:32Z published: 2024-05-14T14:06:32Z canonical: "help.mozenda.com/fixing-blank-records-in-an-agent-collection" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.mozenda.com/llms.txt > Use this file to discover all available pages before exploring further. # Fix blank records in an agent collection When you run an agent in the Web Console, you can end up with blank data fields for several reasons. - The website might have updated their site, changing or removing the information. - The *capture action* is set to optional in the builder. - The settings in the Web Console are set to ignore agent errors. **Update the agent** ![image (2).png](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/image%20%282%29.png) When you set actions as *Optional* in the Agent Builder, the agent doesn't see empty items as errors and doesn't attempt to recover the information. If you have an agent that has several items set to *Optional*, your results can include several incomplete records. To update the agent: 1. If the field is blank, visit the web page where that data was originally collected. 2. Compare data in the Web Console to the web page. 3. If the data is absent from the web page, the agent is working properly. If the data is present, update the agent to fix it. In the Agent Builder: 1. Select **File** > **Open Agent** 2. Right-clicking any capture actions in the Action list that have the ⚠️ icon and clear the **Optional** choice. 3. Open the URL from the web page in the Agent Builder. 4. Right-click, then click **Location** > **Alternate Location** to specify a different URL. Or, Write an XPath expression to specifically target the element. 5. Right-click the action and click **Test**. View results in the *Testing Results* tab at the bottom of the Agent Builder window. ![image (1).png](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/image%20%281%29.png) **Run the agent again to recover information** By default, agents are set up to ignore missing items and to complete remaining actions to gather additional information. You can change the error-handling settings to run the job again to try to recover any missing information. In the Web Console: 1. Select **Agents** > **All Agents**. 2. Select the name of the agent. 3. Select ![](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/gears%281%29.png). 4. Select **Harvesting**. 5. Select **Error Handling** . 6. Select **Stop the job so the agent can be fixed** under **When an agent error occurs**. 7. Select **Stop the job so the agent can be fixed** under **When a website error occurs**. 8. Select **SAVE**. ![image.png](https://cdn.document360.io/03076343-9561-4857-8a4e-9f3bfed20ced/Images/Documentation/image%2844%29.png) **Duplicate information** When an agent pauses because of an error, the record it was working on gets recorded even though it's not complete. If the agent is repaired before being resumed, the agent gathers that information again, resulting in duplicate information in the collection.