* Excport Gedcom plugin using GST GedSite option

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
ArildT
Silver
Posts: 7
Joined: 12 Aug 2019 15:32
Family Historian: V7

Excport Gedcom plugin using GST GedSite option

Post by ArildT »

I’m running Family Historian 7.0.23 under Windows 11. The software is installed on a local drive and the project files on OneDrive. When running the plugin “Export Gedcom File” v. 5.8 on FH sample project it works fine. When I run it on my project I run into problems. After the plugin analyzed my project, I get the error messages shown below and the plugin stops working. I use mostly the default setting for your plugin, except that the GEDCOM destination is “(GST) Gedsite”. When I use the Export setting “(Str) Standard Gedcom Release 5.5.1”, no error occurs and a gedcom file is created. Since I plan to use Gedsite with the gedcom file, I would prefer the GST setting. What do I lose when I cannot use Gst setting? It’s obviously something with my data that provokes these errors since the Str setting works with the sample project. Is there any suggestion in the error report that can point me to where in my project the roots of the errors are?

Arild Tangerås

[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1893: attempt to index a nil value (local 'strText')
stack traceback:
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1893: in field 'FileLines'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8523: in local 'doLoadFactsTable'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8606: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8482>
[C]: in function 'string.gsub'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:9371: in local 'useRules'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10649: in function 'ExportGedcom'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10237: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10225>
(...tail calls...)
[C]: in function 'iuplua.MainLoop'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:2765: in field 'ShowDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10505: in function 'GUI_MainDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10718: in main chunk
User avatar
tatewise
Megastar
Posts: 29078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Excport Gedcom plugin using GST GedSite option

Post by tatewise »

Sorry about that. It occurs while the plugin is reading your Fact Set definition files.
The main difference between GedSite exports and all others is that Fact Set definitions are included to allow narrative Sentence Templates to be used in displays in GedSite.

That feature can be disabled on the Extra Options tab by unticking Export Fact Definitions at the bottom.

I have produced a minor variant of the plugin to report which Fact Set file is causing the problem.
So try installing the plugin via this link:
Then run it with the Export Fact Definitions option ticked and tell me what filename it reports.
Last edited by tatewise on 10 Sep 2024 14:03, edited 1 time in total.
Reason: Disabled plugin link as later version in Plugin Store
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
ArildT
Silver
Posts: 7
Joined: 12 Aug 2019 15:32
Family Historian: V7

Re: Excport Gedcom plugin using GST GedSite option

Post by ArildT »

Thank you for your reply.
I have now used your test version 5.8.1 with and without the setting “Export Fact Definitions”. When this is off it runs without problem. When it is on it creates the error report below and then does not continue (and thus does not create a report in FH).

Arild Tangerås

[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1894: attempt to concatenate a nil value (global 'strFilename')
stack traceback:
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1894: in field 'FileLines'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8526: in local 'doLoadFactsTable'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8609: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8485>
[C]: in function 'string.gsub'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:9374: in local 'useRules'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10652: in function 'ExportGedcom'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10240: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10228>
(...tail calls...)
[C]: in function 'iuplua.MainLoop'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:2768: in field 'ShowDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10508: in function 'GUI_MainDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10721: in main chunk
User avatar
tatewise
Megastar
Posts: 29078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Excport Gedcom plugin using GST GedSite option

Post by tatewise »

Ah! The problem is slightly different from what I expected so try the plugin again via this link:
Last edited by tatewise on 10 Sep 2024 14:02, edited 1 time in total.
Reason: Disabled plugin link as later version in Plugin Store
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
ArildT
Silver
Posts: 7
Joined: 12 Aug 2019 15:32
Family Historian: V7

Re: Excport Gedcom plugin using GST GedSite option

Post by ArildT »

I've installed the new version (it still says 5.8.1) and get more or less the same result I think.

[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1894: attempt to concatenate a nil value (global 'strFilename')
stack traceback:
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1894: in field 'FileLines'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8527: in local 'doLoadFactsTable'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8610: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8485>
[C]: in function 'string.gsub'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:9375: in local 'useRules'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10653: in function 'ExportGedcom'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10241: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10229>
(...tail calls...)
[C]: in function 'iuplua.MainLoop'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:2768: in field 'ShowDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10509: in function 'GUI_MainDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10722: in main chunk
User avatar
tatewise
Megastar
Posts: 29078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Excport Gedcom plugin using GST GedSite option

Post by tatewise »

OK, let me investigate, do some testing, and add some more diagnostics ~ probably tomorrow.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 29078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Excport Gedcom plugin using GST GedSite option

Post by tatewise »

Firstly, please update your Profile displayed on the right to say FH V7 instead of V6.2 as that keeps confusing me.
Click you username ArildT, navigate to Edit Profile, select Family Historian V7 then scroll down to SUBMIT.

The problem seems to be related to the names of the Fact Set files being used.

Do any of your Fact Set names involve accented letters or unusual symbols?
The plugin has been modified to try and accommodate such letters and symbols.

I have added a diagnostic report to the plugin to display the filename of each Fact Set file it finds.
The last report before the error traceback should be the file causing the problem needing further investigation.

Download the plugin via link:
Last edited by tatewise on 10 Sep 2024 14:01, edited 1 time in total.
Reason: Disabled plugin link as later version in Plugin Store
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
ArildT
Silver
Posts: 7
Joined: 12 Aug 2019 15:32
Family Historian: V7

Re: Excport Gedcom plugin using GST GedSite option

Post by ArildT »

When I run the updated version I get the following messages:

• Fact Set .fhf file found in a GroupIndex.fhdata file:
C:\ProgramData\Calcio Pie\Family Historian\Fact Types\Custom\Extended Set.fhf
• Fact Set .fhf file found in a GroupIndex.fhdata file:
C:\ProgramData\Calcio Pie\Family Historian\Fact Types\Standard\Standard.fhf
• Fact Set .fhf file found in a GroupIndex.fhdata file:
C:\Users\Arild\OneDrive\FH\All_FH2\Alle_FH7n\Alle_FH7n.fh_data\Fact Types\TMG import.fhf
• Fact Set .fhf file found in a GroupIndex.fhdata file:
C:\Users\Arild\OneDrive\FH\All_FH2\Alle_FH7n\Alle_FH7n.fh_data\Fact Types\TMG Import-NyPC-2021.fhf

As this indicates, I have migrated my data into FH from TMG. I’ve used TMG through many versions, 9.05 when I did the import. I have made a language pack for Norwegian for FH, and both in TMG and now in FH I have created new facts and edited the Norwegian part of facts. So my data may not be very clean. When using your plugin to create the gedcom file, I have set FH to use English.

After the massages shown above appear, then as before this report follows:

[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1893: attempt to index a nil value (local 'strText')
stack traceback:
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1893: in field 'FileLines'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8524: in local 'doLoadFactsTable'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8607: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:8482>
[C]: in function 'string.gsub'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:9372: in local 'useRules'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10650: in function 'ExportGedcom'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10238: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10226>
(...tail calls...)
[C]: in function 'iuplua.MainLoop'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:2765: in field 'ShowDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10506: in function 'GUI_MainDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:10719: in main chunk
User avatar
tatewise
Megastar
Posts: 29078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Excport Gedcom plugin using GST GedSite option

Post by tatewise »

So it looks like something in the TMG Import-NyPC-2021.fhf file is upsetting the plugin.

Can you please add that .fhf file to the ATTACHMENTS tab of your reply so I can reproduce the error and analyse the file contents.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
ArildT
Silver
Posts: 7
Joined: 12 Aug 2019 15:32
Family Historian: V7

Re: Excport Gedcom plugin using GST GedSite option

Post by ArildT »

The file seems to be empty! (0 bytes). When I try to attach it, it says "File too large".
avatar
ArildT
Silver
Posts: 7
Joined: 12 Aug 2019 15:32
Family Historian: V7

Re: Excport Gedcom plugin using GST GedSite option

Post by ArildT »

Copied a fact from another fact set to this fact site, and now it runs without any errors.
Thank for the help.
Regards,
Arild
User avatar
tatewise
Megastar
Posts: 29078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Excport Gedcom plugin using GST GedSite option

Post by tatewise »

That is very stange! However, the problem seems to be fixed.
Nevertheless, I'll try and add some plugin defensive checks to prevent that type of failure.

BTW: You can download the original plugin V5.8 from the Plugin Store and that should now work OK.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2699
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Excport Gedcom plugin using GST GedSite option

Post by Mark1834 »

It might be worth reporting to CP. If the TMG direct import has created an empty Fact Set file, it sounds like a possible bug.

I've been experimenting with how FH handles empty Fact Sets to see if it has any implications for my own plugins. I created an empty Fact Set file in the Sample Project fact folder, and sure enough, FH updates GroupIndex.fhdata next time it runs to include the empty file, which it probably also shouldn't do.

Running the Export Gedcom File with Fact Set Export selected duplicates this error. It also crashes the Change Any Fact Tag plugin, as they presumably use the same code for reading the UTF-16BOM Fact Set files in legacy versions of FH.

Fortunately, my plugins are robust to this error, as they use different logic for importing Fact Sets, and the plugin code processes the empty string returned from an empty file correctly.
Mark Draper
User avatar
tatewise
Megastar
Posts: 29078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Excport Gedcom plugin using GST GedSite option

Post by tatewise »

Export Gedcom File plugin Version 5.9 Date 09 Sep 2024 is in the Plugin Store.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
Post Reply