* Add Source from Template plug-in error

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
dkbutler13
Gold
Posts: 14
Joined: 13 Jan 2020 20:09
Family Historian: V7

Add Source from Template plug-in error

Post by dkbutler13 » 17 Feb 2023 02:15

I recently got a new laptop and transferred all of my family historian data over to it. All of my plug-ins work except for Add Source from Template. I have deleted and re-installed multiple times, but continue to get this error message:

[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:188:
invalid escape sequence near '".*\(.-)\.'. No changes have been
made to data records.

Anyone have any ideas?
Thanks so much!

User avatar
ColeValleyGirl
Megastar
Posts: 4850
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Add Source from Template plug-in error

Post by ColeValleyGirl » 17 Feb 2023 11:01

That plugin has not been updated for version 7 -- it's always worth checking for compatibility with v7 if you encounter a similar error (https://pluginstore.family-historian.co ... m-template).

The author does not intend to update it, but I have her permission to release an updated version when I find time. You're the only person since V7 came out who has encountered an error, so it has been low priority to address.

User avatar
tatewise
Megastar
Posts: 27074
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Add Source from Template plug-in error

Post by tatewise » 17 Feb 2023 11:02

Yes, I get the same failure.
I don't understand how that plugin ever worked (unless Lua 5.1 with FH V6 was different to Lua 5.3 with FH V7) or your Projects were always running the plugin for the first time.

Line 188 is:
local strFile = string.match(filename, ".*\\(.-)\.dat")

The \ before the . should be a % escape character to inhibit the . 'magic' symbol.

So line 188 should be:
local strFile = string.match(filename, ".*\\(.-)%.dat")

So in the Tools > Plugins... window select the plugin and click Edit...
Scroll down to line 188 and change the \ to %
Use File > Save and close the editor window with X icon top right.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 4850
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Add Source from Template plug-in error

Post by ColeValleyGirl » 17 Feb 2023 11:44

Mike, that plugin worked reliably under version 6 (Lua 5.1).

From the KB:
in Family Historian 5 and 6 both % and the slash character were permitted as escape characters
There will be other compatibility issues as I haven't even started to review it.

avatar
dkbutler13
Gold
Posts: 14
Joined: 13 Jan 2020 20:09
Family Historian: V7

Re: Add Source from Template plug-in error

Post by dkbutler13 » 17 Feb 2023 14:48

So I did what you advised, and it fixed that problem, but then it gave me a similar error message on another line that I also fixed. Lastly, it's giving me (hopefully) one final error message:

748: bad argument #1 to 'Destroy' (invalid Lua object, destroyed iupHandle in C but not in Lua).

Any thoughts on that one?

I really appreciate your help with this. You guys are always so helpful on these forums.

User avatar
tatewise
Megastar
Posts: 27074
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Add Source from Template plug-in error

Post by tatewise » 17 Feb 2023 14:56

As Helen says, that plugin is only designed to work with FH V5 & V6 as it says in the Plugin Store.

You have found some incompatibilities with FH V7 and there are probably others.
So it needs a detailed review and updates to get it working reliably.
I noticed for example that it does not handle UTF8 accented foreign letters and symbols in text or file paths.

How urgent is your need for it to work?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 4850
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Add Source from Template plug-in error

Post by ColeValleyGirl » 17 Feb 2023 14:58

Yes, how urgent. I can move it up my work schedule if you desperately need it.

avatar
dkbutler13
Gold
Posts: 14
Joined: 13 Jan 2020 20:09
Family Historian: V7

Re: Add Source from Template plug-in error

Post by dkbutler13 » 17 Feb 2023 15:11

It's not super urgent. I haven't been working on my ancestry stuff for a while and am just starting to get back into it. I can always just enter the sources manually until this is up and running for v7. I hadn't even realized until you guys pointed it out that it hasn't been formatted for v7 yet, so at least that takes away the frustration of not knowing why it's not working.

Post Reply