Error in Create Generations Book extension?

57 views
Skip to first unread message

Edward Connolly

unread,
Aug 7, 2024, 2:44:08 PM8/7/24
to GEDitCOM II Discussions
Hi

I have recently got a new replacement MacBook.

Opened GedItCom and everything appeared to run OK but when today I tried to run the "Create Generations Book' extension I get the following error message

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Any ideas?

Ed

MacBook Pro M3 / Sonoma 14.3

John Nairn, Developer

unread,
Aug 8, 2024, 9:31:09 PM8/8/24
to GEDitCOM II Discussions
That extension needs Python and new Macs no longer come with Python. You will have go through the steps of installing Python.

For brief instructions, open GEDitCOM II help window and then

1. Click on "Extensions" in the index on the left of the window
2. Click on "Extensions" in the page that appears after click #1
3. See the section on installing Python 3

Regards,
John Nairn

Edward Connolly

unread,
Aug 9, 2024, 4:35:03 PM8/9/24
to geditcom-ii...@googlegroups.com
Thanks, John

Python 3 was installed but I've worked my way through all the options in the help file and the script now runs but...
the output files do not include a bib file.

I get the following report

-------- Running 'Generations LaTeX Book' version 12 --------
Finding ancestors of root individuals
Finding descendants of tree-top individuals
Preparing LaTeX source files
Traceback (most recent call last):
  File "/Users/eddie/Library/Application Support/GEDitCOM II/System/Scripts/Reports/CreateBook.gplug/Generations LaTeX Book.py", line 2036, in <module>
    WriteUTF8File(rootFldr+"/book.bib",'\n'.join(bib))
  File "/Users/eddie/Library/Application Support/GEDitCOM II/System/Modules/GEDitCOMII.py", line 1335, in WriteUTF8File
    (result,error) = nstring.writeToFile_atomically_encoding_error_(saveFile,objc.YES,NSUTF8StringEncoding,objc.nil)
NameError: name 'objc' is not defined

Ed


--
You received this message because you are subscribed to a topic in the Google Groups "GEDitCOM II Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geditcom-ii-discussions/NFrPrEKhB_I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geditcom-ii-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geditcom-ii-discussions/e9ab191d-8082-404d-85b5-ea58d6d56377n%40googlegroups.com.

theboo...@gmail.com

unread,
Aug 10, 2024, 4:52:31 PM8/10/24
to GEDitCOM II Discussions
Can't help with this specifically  but I may have a bug in this report, or at least the TexShop bit of it.

When I don't know the name of a person, I use five underscores eg Smith, _____

No worries there but on one occasion when I didn't know the wife of a person and, instead of just leaving it as unknown wife as I usually do, I entered her as _____, _____

This caused Texshop to refuse to process past that line. Once I removed offending bit, all was good.

Best

Mick

Edward Connolly

unread,
Aug 10, 2024, 5:41:59 PM8/10/24
to geditcom-ii...@googlegroups.com
On those occasions I used [—?—] to denote an unknown name. ( [—?—],[—?—] ) 

I never had a problem until I moved to my new laptop.

Ed

Sent from my iPad

On 10 Aug 2024, at 21:52, theboo...@gmail.com <theboo...@gmail.com> wrote:

Can't help with this specifically  but I may have a bug in this report, or at least the TexShop bit of it.
--
You received this message because you are subscribed to the Google Groups "GEDitCOM II Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geditcom-ii-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geditcom-ii-discussions/28afc3fd-fd74-46b8-b0c1-5cae42845ce5n%40googlegroups.com.

John Nairn

unread,
Aug 11, 2024, 2:06:25 PM8/11/24
to geditcom-ii-discussions@googlegroups.com geditcom-ii-discussions@googlegroups.com
Underscore is special character in LaTeX for subscripting (in math mode). The book extension checks for special LaTeX ncharacters, but I guess not that one. I will look into changing that

You could change LaTeX source files to \_\_\_\_\_ to get 5 underscores. The back slash “escapes” the underscore to output that in typeset output.

John Nairn

John Nairn, Developer

unread,
Aug 12, 2024, 2:35:25 PM8/12/24
to GEDitCOM II Discussions
Two fixes from this chain:

1. The error writing files is caused by MacOS Ventura reducing support for using Python. Apple used to define and Objective C object called "objc" and that code was using it. That code was writing text to a file and was done in the Python module using MacOS methods that relied on "objc". I just rewrote to use only Python methods and therefore to not relay on Apple support. I just uploaded a new python module that should fix the book creation script. You can get it here:


Dowload GEDitCOMII.py and replace the older one a ~/Library/Application Support/GEDitCOM II/System/Modules

I did not update the "date" on above link but I am planning to post 3.2 build 4 very soon that will have this updated module (and some other things). I will fix dates then.

2. Second issue with underscores in a name like "Mary _____". I just checked and the scripting checks for that and fixes to work in LaTeX. Here is LaTeX output from such a name when I tried it:

     and Lucy \_\_\_\_\_ ({\bf\hyperlink{3}{3}})

If you are not seeing this in your book output, either that name is some other place in the report or those underscores where some other character that looks like an underscore (perhaps some unsupported unicode character). If your underscores not automatically converted as above, send me a short sample ".tex" file output from the CreateBook extension.

John Nairn

theboo...@gmail.com

unread,
Aug 12, 2024, 7:19:43 PM8/12/24
to GEDitCOM II Discussions
Thanks, John

It all worked fine this time so, I assume, there was some other issue before that seemed related to the underscore issue but was not. Sorry

Mick

Edward Connolly

unread,
Aug 13, 2024, 2:21:35 AM8/13/24
to geditcom-ii...@googlegroups.com
Thanks John

That seems to have solved the problem :)

Ed

Sent from my iPhone

On 12 Aug 2024, at 19:35, John Nairn, Developer <jo...@geditcom.com> wrote:


You received this message because you are subscribed to a topic in the Google Groups "GEDitCOM II Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geditcom-ii-discussions/NFrPrEKhB_I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geditcom-ii-discu...@googlegroups.com.

Henry Carruthers

unread,
Nov 23, 2024, 10:34:09 AM11/23/24
to geditcom-ii...@googlegroups.com
Hi John

I’m getting the following error message when trying to run the Create Generations book extension:

Traceback (most recent call last):
  File "/Users/henrycarruthers/Library/Application Support/GEDitCOM II/System/Scripts/Reports/CreateBook.gplug/Generations LaTeX Book.py", line 45, in <module>
    from GEDitCOMII import *
  File "/Users/henrycarruthers/Library/Application Support/GEDitCOM II/System/Modules/GEDitCOMII.py", line 35, in <module>
    from Foundation import *
ModuleNotFoundError: No module named 'Foundation'

I have installed MacTeX and put the .py plugin and the CreateBook.gplug into my Applications folder. Is there anything else I should do?

It used to work a couple of years ago.

Thanks

Henry

John Nairn

unread,
Nov 25, 2024, 11:55:43 PM11/25/24
to geditcom-ii-discussions@googlegroups.com geditcom-ii-discussions@googlegroups.com
Do you get a new Mac since it worked? That error message means that part of Python that Apple provides to communicate with applications like GEDitCOM II was not found.

For help on getting Foundation module installed, see GEDitCOM II help — click “Extensions” in index on the left and than click “Extensions” again on the right. See the section on “Installing Python When Needed.” It explains how to fix “No module name Foundation” error.

It can be tricky and can vary with each MacOS. I have been able to get it to work in any MacOS. I have found an issue in Create Generations Book extension in MacOS Sequoia. I have it fixed and will post fix soon. Let me know if you are using Sequoia. That issue is not related to the Foundation module error. You have to fix that one first.

John Nairn

Henry Carruthers

unread,
Nov 27, 2024, 7:10:06 AM11/27/24
to geditcom-ii...@googlegroups.com
Thanks John I’ll try that.

I’m using the same Mac as before with Monterey 12.1

I’ll let you know if that doesn’t work.

Henry

Reply all
Reply to author
Forward
0 new messages