This Help forum is for issues relates to the latest release (1.7.10/11/12). For issues related to development versions please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

TOPIC: Error message on importing gedcom file

Error message on importing gedcom file 2 months 3 weeks ago #1

  • james-l
  • james-l's Avatar
  • Offline
  • New
  • Posts: 8
Hello all,

I recently updated to webtrees 1.7.12, and apart from a minor issue (which I raised in the forum) everything seemed to be working fine.

However, today I exported a gedcom file, made some minor changes to it, and tried to import the modified gedcom file. This led to the following error message:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10-M2' for key 'PRIMARY'

Any idea what is causing this error?

Thanks in advance,

James
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #2

  • norwegian_sardines
  • norwegian_sardines's Avatar
  • Offline
  • Gold
  • Posts: 1521
Did you add or modify a level 1 OBJE entry with the XREF of 10-M2
Ken
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11054
This (probably) means that your GEDCOM file contains two records with the same unique identifier (M2).
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #4

  • james-l
  • james-l's Avatar
  • Offline
  • New
  • Posts: 8
I checked the gedcom file, and there's only one object M2:
0 @M2@ OBJE

and only one reference to this object:
1 FAMC @F47@
1 OBJE @M2@

James
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #5

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11054
Can you send me the GEDCOM file? This email address is being protected from spambots. You need JavaScript enabled to view it.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11054
OK, there's nothing obviously wrong with the file. It imports OK on my test/dev server.

Can you try creating a new tree in webtrees, and then importing the GEDCOM file into that new/empty tree?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #7

  • james-l
  • james-l's Avatar
  • Offline
  • New
  • Posts: 8
OK I was trying to avoid that because I believe one looses all the change log information, but that's not very important.

James
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #8

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11054
If you've tried to import the GEDCOM file into the existing tree, then you will already have lost the change-log. This is deleted as part of the import process.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Error message on importing gedcom file 2 months 3 weeks ago #9

  • james-l
  • james-l's Avatar
  • Offline
  • New
  • Posts: 8
I created a new gedcom and imported the file, with no problems.

However, when I checked for duplicates, M2, M48 and M50 are flagged as duplicates, but in fact they have different associated image files.
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #10

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11054
> However, when I checked for duplicates, M2, M48 and M50 are flagged as duplicates

That is a fairly simple test. It is only looking for duplicate descriptions (titles) of the media objects.

Did you, perhaps, select the "keep media files" option when you imported the tree?
You should not have done this, and it could have caused the original error message.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #11

  • james-l
  • james-l's Avatar
  • Offline
  • New
  • Posts: 8
I can't be sure but I don't believe I selected this option, and I don't think it's the default option so it's unlikely I chose it accidentally.

James
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #12

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 11054
I'm struggling to think of another explanation for this error.

Do you get it consistently each time you try to import the GEDCOM file?
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Error message on importing gedcom file 2 months 3 weeks ago #13

  • james-l
  • james-l's Avatar
  • Offline
  • New
  • Posts: 8
I tried importing the gedcom file 2 or 3 times, and each time, after the import had progressed about 85%, I got the error message.
Since I was able to import the gedcom file after creating a new tree, it seems that the problem must be due to some incoherency in the SQL tables, related to this particular gedcom file.
I have imported other gedcom files without difficulty.

I do have a recent backup of the SQL tables if it would help to search for something particular.

James
The administrator has disabled public write access.
Powered by Kunena Forum