* Map Life Facts error message

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
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Map Life Facts error message

Post by Kim Travis »

Having geocoded quite a few Places, I go this error message (below) and the Plugin stopped. Seems to be the next place to be geocoded that causes this (don't know how I can tell which this is), and it happens reproducibly. Any ideas? I downloaded the Plugin today so its the latest version,

Thanks,

Kim
------------------------------------
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:5197: attempt to index local 'tblLoc' (a nil value)
stack traceback:
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:5197: in function 'doRefreshLocation'
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:5506: in function 'doGeocodePlot'
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:5563: in function <[string "C:\ProgramData\Calico Pie\Family Historian\..."]:5554>
(tail call): ?
[C]: in function 'MainLoop'
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:2430: in function 'ShowDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:6956: in function 'GUI_MainDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\..."]:8516: in main chunk
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts error message

Post by tatewise »

Sorry about that Kim. The plotting scripts in this plugin have not changed much for years, so this is a new problem.

Unfortunately, I am away this weekend so cannot help much until next week.

The following guidance assumes you are using Geocode Plot All Locations on the Geocode Location Plots tab.
When the error occurs, the Location field probably displays the last successful plot.
So make a note of that, close the Plugin and run it again (it may automatically go to that Location).
Ensure the noted Location is chosen if necessary via the Map Life Facts Place List as explained below.
Click on the Location field to show the Map Life Facts Place List where Place names can be chosen.
The current Place will be highlighted and the next one will probably be the rogue, or perhaps the one after that.
Try selecting them one at a time and using Geocode Plot This Location.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

I caused the error, then closed and restarted the Plugin, and moved to the next unplotted place following the one shown when the error had previously occured. As soon as I moved to the next unplotted place the error was caused.

I have some poorly formed Places, which I'm sure cannot be located, but no special characters or anything which ought to cause such an error.

No rush, I'm happy to wait for you to shed light on this one,

Regards,

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

Re: Map Life Facts error message

Post by tatewise »

Kim, is this the first time you have used this Plugin?
Presumably you have set up your Google Maps API Key?
If used before, then has it always behaved correctly before?
If this is first time, then are you using it in its default mode without changing any settings (apart from API Key) ?

Knowing those details will help me understand more about the background to the problem.

I then plan to give you a diagnostic version of the Plugin to run and throw some light on the cause of the problem.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

I have recently bought a new laptop and transferred onto it (using your Plugin). I used an earlier version of the Plugin on my old laptop a while ago and it worked fine, but I didn't save the results as I wanted to regularise my Place records first. I think the only option I changed was to store the results in my FH Place records,

Thanks,

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

Re: Map Life Facts error message

Post by tatewise »

Sorry Kim, but I am getting confused about which Plugins and Versions you used where and when.
Are you using 'Plugin' to refer to both Backup and Restore FH Settings and Map Life Facts ?
Also it is not clear to me on which laptop you changed which options.

It sounds like you never ran the earlier version of the Map Life Facts Plugin after transferring to the new laptop ?

Have you set up your Google Maps API Key? If so, was that on the old laptop or the new laptop.

I am just trying to understand the history of how you have got to the current situation.
That may also identify a simple workaround to fix the problem.
My dilemma is that such a quick fix may obscure the error in the Plugin that needs to be corrected.

BTW: The Map Life Facts Plugin always saves its plotted results somewhere, either in the Plugin Data folder or in the FH Place records.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

Sorry I wasn't clear. I used the Backup and Restore FH Settings to port FH to my new laptop. I used an old version of Map Life Facts on my old laptop some time ago, but saved no results to my FH database. I don't recall needing an API key for that version of the Plugin. On the new laptop I have only used the latest version of the Map Life Facts plugin, for which I obtained an API key (using my new laptop). I ran the plugin using the option to save output to my FH Place records and other options were I believe left in their default settings,

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

Re: Map Life Facts error message

Post by tatewise »

OK Kim, that is clearer, thank you.

Backup and Restore FH Settings would have copied the old Map Life Facts Plugin across to the new laptop.
The Project backup would have copied the Map Life Facts saved Location Plots in the Plugin Data Folder of the Project.

The older version of Map Life Facts did not need an API Key as Google had not mandated it then.

Initially the new version of Map Life Facts would have used the saved Location Plots in the Plugin Data Folder of the Project.
Did those initial uses of the Plugin work OK when you were setting the API Key?
Did you perform any Geocode Plotting at that stage?
Did errors only start after using Set Preference Options to change Database In: from Plugin Data Folder to Place Records?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

I believe that I set the option to store results in Place records straight away on first opening the Plugin, at the same time I put in the API key, and it worked for a couple of thousand Places and then threw the error, ie I tried to do it the way I wanted first time by reading up on all options beforehand. So that probably doesn't help you much with the diagnosis. Perhaps I should try getting rid of the geocoding results folder that moved over from my old laptop, and see what happens then?

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

Re: Map Life Facts error message

Post by tatewise »

What you suggest was going to be my suggested 'quick fix' but let me consider the options a little longer, and I will give you explicit instructions of what to do. I may want to run a diagnostic version of the Plugin before destroying the evidence.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

OK, will do,
Kim
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts error message

Post by tatewise »

Kim, please try the Plugin V4.5.1 attached, but you must extract it from the ZIP file (do you know how to do that?)
[ EDIT: Attachment deleted as fixed version now in Plugin Store. ]

If necessary you can always re-install Map Life Facts V4.5 from the Plugin Store.

When you run V4.5.1 and it encounters the error, it should produce a popup window with purple text saying:
Warning ~ Diagnostic ~ tblLoc=nil, strLoc=<your Place name>
where <your Place name> is the Place that is invoking the error.

After clicking OK, it should continue and try to fix the problem.
Let me know if that avoids any subsequent reoccurrence of the error.

But if the error persists, then I will explain the workaround that should fix things.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

That worked a treat! Threw 4 warnings but carried on to complete the task. The common factor of the 4 troublesome places was their extreme length (eg including a long list of field names followed by their location), and in some cases ambiguity. Do you want me to send you the 4 offending places?

Thanks very much for your work on this,

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

Re: Map Life Facts error message

Post by tatewise »

Yes, please send as much as you can, as that might explain how the problem arose, and lead to a better fix.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

I'm pretty sure the 4 are:
1 / Great Field; Green Marled Earth; Round Meadow; Croft at the Door; Riding Platt; Long Shutt; Calfe Croft; Little Marled Earth; Clough Field; Farmost Field; Middle Field; Field next the Wood and a piece of land called Cloughs or Wood; all in Blackley, Manchester, LAN, ENG
2/ Gt Field; Gt Green Marled Earth; Round meadow; Croft at the Door; Riding Platt; Long Shutt; Calf Croft; Kilner Clough; Wood; Frith Field; Lt Marled Earth; Wheat Croft; Gt Wood (15A); Marled Field; Parke & Broad/Gt Meadow (5A); Blackley, Manchester, LAN, ENG
3/ Natebye Hall (Nateby; Garstang); Garstange; Holmes alias Trenal (Trunnah & Holmes; Poulton le Fylde); Esbrecke (Elswick?; St Michael on Wyre); Tookethe infra Assheton in Amounderness (Tulketh; Ashton in Ribble; Preston), Garstang; Poulton le Fylde; St Michael on Wyre?; Preston, LAN, ENG
4/ Natebye Hall (Nateby; Garstang); Garstange; Holmes alias Trenal (Trunnah & Holmes; Poulton le Fylde); Esbrecke (Elswick?; St Michael on Wyre); Tookethe infra Assheton in Amounderness (Tulketh; Ashton in Ribble; Preston), Garstang; Poulton le Fylde; St Michael on Wyre?; Preston, LAN, ENG

I will resist apologising for these ill-formed places - they are 4 out of about 7000 :)

Regards,

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

Re: Map Life Facts error message

Post by tatewise »

No need to apologise.
Testing with those long (greater than 254 character) Place names revealed the problem.
The GUI IUP Library used to build the user interface, truncates those long text strings.
I have designed a crude workaround that should work in all but very unusual cases.
Let me test it further, and then I will post it here for you to try.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

Makes sense,

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

Re: Map Life Facts error message

Post by tatewise »

I should have asked before, but were those very long Place names added between using "an old version of Map Life Facts on old laptop some time ago" and using V4.5 recently?
i.e. They only existed for Map Life Facts V4.5 recently and not for the old version some time ago.
The reason I ask is I believe that problem would have arisen some time ago if those long Place names had existed then.
Confirming that scenario adds confidence that I have found the correct cause.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

Unfortunately I can't be certain. It's complicated, but the bottom line is I cannot be sure. They were in the db, but when I used the older version of Map Life Facts I may well not have reached them when I abandoned the Geocoding part way through, once I'd got a feel for how it worked, so that I could do some regularisation on the Places first.

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

Re: Map Life Facts error message

Post by tatewise »

I have looked back at the script in old versions of the Plugin as far as V2.1 in 2012 and the 'problem' area has not changed since, so would have suffered from the same error with long Place names.

The attached Map Life Facts Plugin Version 4.5.2 Date 18 Oct 2019 ZIP file has a final workaround.
[ EDIT: Attachment deleted as latest Version 4.6 is in Plugin Store. ]
It cannot fix the IUP Library so it relies on the first 253 characters of a long Place name being unique, and uses that to lookup the full Place name as necessary.
On the Geocode Location Plots tab, after clicking the Location field, the Map Life Facts Place List is displayed, and shows any very long Place names truncated (due to IUP Library bug), but everywhere else full Place names are used.
If all goes well, I will publish it in the Plugin Store next week.

I will report the IUP Library bug, but even when fixed, it will not help FH Plugins until FH adopts that fixed IUP Library version.

BTW: The previous diagnostic Plugin Version 4.5.1 did prevent the error messages, but did not handle those very long Place names correctly and any associated plot details were not suitably preserved.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts error message

Post by tatewise »

The Map Life Facts Plugin Version 4.6 Date 22 Oct 2019 is now in the Plugin Store.

I reported the IUP Library bug, but the response implied the truncation was deliberate and that one of the other fields be used for such very long text, which is what the latest Plugin uses. However, at least the documentarian needs improving to clarify the truncation behaviour.
[EDIT] I have persisted with this problem, and it has now been recognised as a problem that will be fixed in the next IUP version, although that won't help Plugins until FH adopts that IUP version.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Kim Travis
Diamond
Posts: 51
Joined: 04 Jan 2018 21:17
Family Historian: V6

Re: Map Life Facts error message

Post by Kim Travis »

Thanks very much Mike. Very helpful and thorough as always,

Kim
Post Reply