I am getting the Object reference not set to an instance of an object error


I keep getting the error “Object reference not set to an instance of an object” error and I’m not sure how to fix this.
Thank you!

Hey @gianna.demetroulakos,

Object reference not set to an instance of an object normally occurs when a variable is null. Try putting a message box before the activity that breaks, run in debug with the locals panel pinned, and look for a null variable involved in the activity once you’ve reached the message box.

Hope this helps!

Hi @gianna.demetroulakos,

As mentioned by @william.coulson, The Object reference not set to an instance of an object normally occurs when a variable is null.

  1. Run the Code in the Debug mode.
  2. When the error occurs, Check the variable which has a null value in Locals Tab.

Warm Regards,
Ranjith Udayakumar

thank you! It says my DataTable variable is null - how would I correct this?

Hi @gianna.demetroulakos,

Please mark it has solution.

Warm Regards,
Ranjith Udayakumar

Hi @gianna.demetroulakos,

Have you tried using a Build Data Table to initialise the DataTable variable?

You need to add the correct amount of columns for your data. For example, you might be scraping a name, address and a phone number. These fields need to be present in the Build Data Table to scrape properly.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.