Answers.Body: <p>In the absence of clear error information, I went into trial and error mode. </p>
  
  <p>I disabled each mapping in turn. In the end, I found it was the attempt to import "contribution status" that triggered the failure. It is likely that the contents didn't match required values in the database. Though, in this case, the error message seemed to have nothing to do with that. My previous experiences with similar problems generated more clear errors that the content of the field was invalid.</p>
  
  <p><a href="https://i.sstatic.net/81CIX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/81CIX.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-29T20:53:24.540Z
Answers.LastActivityDate: 2019-11-29T20:53:24.540Z
Answers.UserDisplayName: kapn
Body: <p>I am getting an error when I import contributions.</p>
  <p>I have successfully imported contributions before from other data sets.
  This dataset is a little more rich and I have now added a 3 custom fields to contain the messaging options that the user can complete.
  The initial mapping and basic checks pass. However at the step of the actual import, every record fails with the error &quot;Expected one Contribution but found 25&quot;</p>
  <p>I have reviewed the mapping and can't see any obvious issues. I have searched stackexchange and the web with no result that seems to relate to my situation.</p>
  <p>I would love to hear any ideas. I don't see any records in the CiviCRM log, though maybe there is some further switch I should be enabling to get more information.</p>
  <p>In response to a comment, I enabled debugging and backtrace. I ran a test import, but no errors of any kind were thrown into the CiviCRM log in the ConfigAndLog directory. It does log other errors there, so I can only assume that it doesn't see this as an error of that kind. I continue to receive the &quot;Expect one ... found 25&quot; error in the front end output.</p>
  <p>The problem occurs as I say in my &quot;Answer&quot; below when I try to use one of the existing fields to set &quot;Contribution status&quot;. I assume and accept that the data is probably incorrect for the column in the db (though I can't find it), but the resulting error makes no sense. I'm fine with that but thought I'd share back into this space since asked and it might be helpful in clarifying the error that is thrown.</p>
  <p>I am running 5.19.3 on WordPress 5.3</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-30T20:19:32.987Z
Comments.Text: Could you please turn on Debugging and Backtrace (**Administer menu > System Settings > Debugging and Error Handling**) and replicate the error, then edit the question to include the full error/backtrace? Also post your CiviCRM version?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-03T04:49:04.857Z
Comments.Text: Turning on debugging and backtrace should show more details with the "Expected one, found 25" error.  Perhaps it's bubbling up from somewhere that isn't passing the extended info.  As for the error - somewhere in the code is a Contribution API `getsingle` call.  This error happens most often when a value is missing - e.g. "find me the contribution with an ID of `x`" normally returns one contact - but if `x` is blank, it will return ALL contributions.  Since the API normally limits to 25, you get this error.
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <civicontribute><import><data-import>
Title: Importing contributions: "Expected one Contribution but found 25"
ThreadText: # Importing contributions: "Expected one Contribution but found 25"
  
  (Asked by: username_0 on 2019-11-29)
  
  I am getting an error when I import contributions.
  
  I have successfully imported contributions before from other data sets.
  This dataset is a little more rich and I have now added a 3 custom fields to contain the messaging options that the user can complete.
  The initial mapping and basic checks pass. However at the step of the actual import, every record fails with the error "Expected one Contribution but found 25"
  
  I have reviewed the mapping and can't see any obvious issues. I have searched stackexchange and the web with no result that seems to relate to my situation.
  
  I would love to hear any ideas. I don't see any records in the CiviCRM log, though maybe there is some further switch I should be enabling to get more information.
  
  In response to a comment, I enabled debugging and backtrace. I ran a test import, but no errors of any kind were thrown into the CiviCRM log in the ConfigAndLog directory. It does log other errors there, so I can only assume that it doesn't see this as an error of that kind. I continue to receive the "Expect one ... found 25" error in the front end output.
  
  The problem occurs as I say in my "Answer" below when I try to use one of the existing fields to set "Contribution status". I assume and accept that the data is probably incorrect for the column in the db (though I can't find it), but the resulting error makes no sense. I'm fine with that but thought I'd share back into this space since asked and it might be helpful in clarifying the error that is thrown.
  
  I am running 5.19.3 on WordPress 5.3
  
  **Tags:** civicontribute, import, data-import
  
  > **Comments:**
  > **username_1**: Could you please turn on Debugging and Backtrace (**Administer menu > System Settings > Debugging and Error Handling**) and replicate the error, then edit the question to include the full error/backtrace? Also post your CiviCRM version?  
  > **username_1**: Turning on debugging and backtrace should show more details with the "Expected one, found 25" error.  Perhaps it's bubbling up from somewhere that isn't passing the extended info.  As for the error - somewhere in the code is a Contribution API `getsingle` call.  This error happens most often when a value is missing - e.g. "find me the contribution with an ID of `x`" normally returns one contact - but if `x` is blank, it will return ALL contributions.  Since the API normally limits to 25, you get this error.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-11-29. Score: 3 | Accepted answer
  
  In the absence of clear error information, I went into trial and error mode.
  
  I disabled each mapping in turn. In the end, I found it was the attempt to import "contribution status" that triggered the failure. It is likely that the contents didn't match required values in the database. Though, in this case, the error message seemed to have nothing to do with that. My previous experiences with similar problems generated more clear errors that the content of the field was invalid.
  
  [![enter image description here](https://i.sstatic.net/81CIX.png)](https://i.sstatic.net/81CIX.png)
  
  
  ---
  
  