Mazinga has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to get Antoine Roundy's Gedcom Crawler script to work on my PC. It goes to the LDS genealogy site and returns genealogy information in Gedcom format that can be consumed by a genealogy program like Family Tree Maker.

I am on XP SP3 and have installed ActivePerl 5.10. I am running the script from the command line. I can use the perl exe to run simple scripts from command line so that appears to be in order ("Hello world"). I put the Gedcom Crawler scripts in C:\Perl\bin so I can just type "perl gedcom-crawler.pl ######" as my command (where ###### is the LDS family id number).

Antoine has provided advice on two variables I needed to change:

$myHostName=''; $myHostIP='###.###.###.###';

I have tried my outside IP, what I get when I go to one of those sites that tells you what your IP is, and I tried my LAN IP: 192.168.1.123 or whatever from ipconfig. (Antoine says if you type in your IP, you can leave myHostName blank.)

I think I must be entering the wrong thing because I am getting "bind: Unknown error at gedcom-crawler.pl line 71." for anything I put in there. I don't know if this is it though.

Line 71 of gedcom-crawler.pl reads:

bind(S,$this)||die "bind: $!";"

So it sounds kind of like I might be putting the wrong thing in there. I am on a LAN of two computers behind a router, too. I didn't paste the whole script because it looks like the license forbids it, however it can be downloaded from http://family.geckotribe.com/gedcom-crawler. There are four files.

Any help you might provide in getting this going would be absolutely wonderful. I have been manually entering a lot of data, ugh, and Antoine's script looks like it might alleviate some of that. Please let me know if I can provide any further info toward a solution.

Thank you.

Replies are listed 'Best First'.
Re: Bind error in script using IO:Socket
by Anonymous Monk on Sep 11, 2009 at 03:01 UTC
    bind(S,$this)||die sprintf "(%d)(%s)(%d)(%s) ", $!,$!,$^E,$^E;

      Hi, and thank you.

      I have just tried that and it threw the following error (this time line 72 since I commented out the previous line 71):

      (10049)(Unknown error)(10049)(The requested address is not valid in its context) at C:\Perl\bin\gedcom-crawler.pl line 72.

      I don't believe familysearch.org has changed much. I am still able to retrieve .ged files manually using the same url as in the script (plus family id).

      Thank you, --M

        ...I don't believe familysearch.org has changed much...

        It has nothing to do with familysearch.org. The program is trying to listen on $myHostIP, but $myHostIP doesn't belong to your machine (like you reported, it belongs to your router).

        10049 WSAEADDRNOTAVAIL

        Cannot assign requested address. The requested address is not valid in its context. This normally results from an attempt to bind to an address that is not valid for the local machine. This can also result from connect (Windows Sockets), sendto, WSAConnect, WSAJoinLeaf, or WSASendTo when the remote address or port is not valid for a remote machine (for example, address or port 0).

        After looking at the program, it does a bind() for no reason, so you can just delete that line.

        Actually, I would throw the program away and rewrite it using LWP::Simple, Gedcom, Getopt::Long.