CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • importing records error
Pages: [1]

Author Topic: importing records error  (Read 1027 times)

ampage

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
importing records error
August 28, 2010, 10:22:24 pm
I'm stumped on this.
I'm trying to import a file and have tried a coupld of work arounds that haven't worked. Most recently I took a file that had successfully imported inthe past and tested to see if it work (which it did). I then copied the data out of a csv file that had failed to import into the other file ( I though maybe the header of the old file was interferring or something). It didn't work.

I don't really understand what the PEAR and DB errors are that are listed inthe backtrace. Can someone help me?

Thank you!

Andrew Page

backTrace

/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 146
, handle,
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 912
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 966
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 574
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2394
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1039
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Core/DAO.php, insert, 279
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php, save, 180
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php, add, 253
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php, create, 1417
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Import/Parser/Contact.php, createProfileContact, 1326
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Import/Parser/Contact.php, createContact, 570
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Import/Parser.php, import, 365
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Import/ImportJob.php, run, 257
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Import/Form/Preview.php, runImport, 229
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 248
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Core/StateMachine.php, mainProcess, 166
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 63
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/home/publicp2/public_html/version2/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 249
/home/publicp2/public_html/version2/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 209
/home/publicp2/public_html/version2/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 332
, civicrm_invoke,
/home/publicp2/public_html/version2/includes/menu.inc, call_user_func_array, 348
/home/publicp2/public_html/version2/index.php, menu_execute_active_handler, 18

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: importing records error
August 29, 2010, 06:26:39 am

can u also paste the mysql error that u get

seems like it might be a session bug, so u might want to logout and log back in and see if that helps

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ampage

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
Re: importing records error
September 08, 2010, 08:14:46 pm
Hi - sorry for the delay in replying. I think this is the information you are looking for? I'm not sure where the UI external identifier is generated...

Thanks again!
Andrew

Import Contacts

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: already exists

    Database Error Code: Duplicate entry '0' for key 'UI_external_identifier', 1062

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_contact (contact_type , do_not_email , do_not_phone , do_not_mail , do_not_sms , do_not_trade , is_opt_out , external_identifier , sort_name , display_name , hash , first_name , last_name , prefix_id , job_title ) VALUES ('Individual' ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , '0' , 'Unnuetzer, Petra' , 'Ms Petra Unnuetzer' , '6a75724dfcad2849dd9178bc4a6a50a8' , 'Petra' , 'Unnuetzer' ,  2 , 'Marketing Manager' )  [nativecode=1062 ** Duplicate entry '0' for key 'UI_external_identifier']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_contact (contact_type , do_not_email , do_not_phone , do_not_mail , do_not_sms , do_not_trade , is_opt_out , external_identifier , sort_name , display_name , hash , first_name , last_name , prefix_id , job_title ) VALUES ('Individual' ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , '0' , 'Unnuetzer, Petra' , 'Ms Petra Unnuetzer' , '6a75724dfcad2849dd9178bc4a6a50a8' , 'Petra' , 'Unnuetzer' ,  2 , 'Marketing Manager' )  [nativecode=1062 ** Duplicate entry '0' for key 'UI_external_identifier']
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_contact (contact_type , do_not_email , do_not_phone , do_not_mail , do_not_sms , do_not_trade , is_opt_out , external_identifier , sort_name , display_name , hash , first_name , last_name , prefix_id , job_title ) VALUES ('Individual' ,  0 ,  0 ,  0 ,  0 ,  0 ,  0 , '0' , 'Unnuetzer, Petra' , 'Ms Petra Unnuetzer' , '6a75724dfcad2849dd9178bc4a6a50a8' , 'Petra' , 'Unnuetzer' ,  2 , 'Marketing Manager' )  [nativecode=1062 ** Duplicate entry '0' for key 'UI_external_identifier']"]
)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: importing records error
September 08, 2010, 10:42:41 pm
Does that imply your import had two rows with the same External ID?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

ampage

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
Re: importing records error
September 10, 2010, 09:37:52 pm
aha - thank you! I was importing and low priority bit of info into the external ID fields not knowing that the ID was supposed to be unique for each record. Thank you! Thank you!
Andrew

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • importing records error

This forum was archived on 2017-11-26.