Try each of the following steps in order until the issue is resolved:
  1. On the General tab of the export, select Include, Selected records. Search for and select the appropriate query.
  2. Recreate the query
  3. Download and run the Clear Invalid Spouse IDs plug-in