I successfully imported a batch of 250 users, but when trying to continue the import I consistently get the following error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'name': INSERT INTO {users} (uid, name, pass, mail, created, access, login, status, timezone, init, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); Array ( [:db_insert_placeholder_0] => 373 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => $S$DKXocx9yM9dPmuikQfZFARwulQ7yQCTIvo7.wqT4UFY.PjiNMmtQ [:db_insert_placeholder_3] => foxxy235@rambler.ru [:db_insert_placeholder_4] => 1286774275 [:db_insert_placeholder_5] => 1443538279 [:db_insert_placeholder_6] => 1443538279 [:db_insert_placeholder_7] => 1 [:db_insert_placeholder_8] => America/Los_Angeles [:db_insert_placeholder_9] => foxxy235@rambler.ru [:db_insert_placeholder_10] => a:1:{s:7:"contact";i:1;} ) in drupal_write_record() (line 7316 of /home/rpgmap/public_html/includes/common.inc).

I have over 9000 to import...

Comments

Steel Rat created an issue.

LIQUID VISUAL’s picture

I also have the same error message when importing a csv list.

ankur.addweb’s picture

Can you please provide configurations that you are using to import? Also, please make sure that your CSV do not have duplicate records.

LIQUID VISUAL’s picture

I was able to correct this problem and import successfully by using the "Save as CSV UTF-8" function in Excel (in Office 365).

LIQUID VISUAL’s picture

Thankfully, people who prefer open source, we can also use Libre Office....just "Save as text-CSV then, after you press "Save," Edit the filter settings to Unicode (UTF-8). I have not had problems importing since ensuring the files were UTF-8.

LIQUID VISUAL’s picture

Have you checked the max no of users you can import setting User Import Config, under "Performance"? Default setting seems to be 250.

/admin/people/user_import/configure