Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Parse_RDF.pl 1.11 issue

Quote Reply
Parse_RDF.pl 1.11 issue
OK...
I have several categories, and created another on to import ODP. Some links were added to my existing categories, and some under the new cat I created. BTW, the links didn't match the category they were supposed to be added.
I got the following output in every of the categories imported:

Topic: 10 (Top/World/Espa±ol/Negocios/MÚxico/Informßtica) - 43
Execute: Duplicate entry '1' for key 1 at Parse_RDF.pl line 222, <CONTENT_FILE>
Quote Reply
Re: Parse_RDF.pl 1.11 issue In reply to
Hmm, I'll have to look into this tommorrow. I'll download the latest ODP to make sure they haven't changed the format again, and try it out locally..

Cheers,

Alex
Quote Reply
Re: Parse_RDF.pl 1.11 issue In reply to
Hi Alex,

Did you see anything wrong, or any hint on how to import ODP ?

Thanks,
Emilio
Quote Reply
Re: Parse_RDF.pl 1.11 issue In reply to
Has anyone else encountered this problem?
Quote Reply
Re: Parse_RDF.pl 1.11 issue In reply to
You might want to use the Parse_RDF.pl from Links SQL 1.1 or 1.0 in the meantime. I'm still looking into this one..

Cheers,

Alex
Quote Reply
Re: Parse_RDF.pl 1.11 issue In reply to
I am running the Parse_RDF.pl file and I am having some problems.

Note: I have the latest version of Parse_RDF.pl downloaded from http://gossamer-threads.com/scripts/licensed/

I set the file to load Just the Arts Category and it worked beautifully.

Now I am trying to load the Business Category on top of the Arts Category and I am having a problem. It will Parse the links just fine but it will not Parse the Categories.

I am thinking that it is trying to insert the Business Category as the first category. Kind of like 1 2 3 4 5 6 7, but category 1 is the Arts category already.

How do I get the file to Parse the Business category on top of the Arts category. In other words if the last category listed is Art/Performing Arts and it is category 3678 how do I get the first Business category listed after the last Arts category as 3679.


This it the error that I am getting:

Topic: 22861 (Top/Business) - 0
Topic: 22862 (Top/Business/Consulting) - 125
Execute: Duplicate entry '1' for key 1 at p.pl line 273, <CONTENT_FILE> chunk 1169244.
Topic: 22863 (Top/Business/Consulting/Education) - 1
Execute: Duplicate entry '2' for key 1 at p.pl line 273, <CONTENT_FILE> chunk 1169874.
Topic: 22864 (Top/Business/Consulting/Mergers and Acquisitions) - 19
Execute: Duplicate entry '3' for key 1 at p.pl line 273, <CONTENT_FILE> chunk 1169902.
Topic: 22865 (Top/Business/Consulting/Referral Services) - 42
Execute: Duplicate entry '4' for key 1 at p.pl line 273, <CONTENT_FILE> chunk 1170043.
Topic: 22866 (Top/Business/Consulting/Referral Services/IT Referrals) - 20
Execute: Duplicate entry '5' for key 1 at p.pl line 273, <CONTENT_FILE> chunk 1170277.
Topic: 22867 (Top/Business/Consulting/Referral Services/Creative Referrals) - 11
Execute: Duplicate entry '6' for key 1 at p.pl line 273, <CONTENT_FILE> chunk 1170392.
Topic: 22868 (Top/Business/Consulting/Referral Services/Remotely Provided Services) - 6
Execute: Duplicate entry '7' for key 1 at p.pl line 273, <CONTENT_FILE> chunk 1170457.

Please Help Me Solve This Problem,


Thank You Very Much,

Mark Foster

Quote Reply
Re: Parse_RDF.pl 1.11 issue In reply to
I know this is related to line "273" which is:

Code:
$sth_Category->execute($CAT{$TOPICNAME}, "$PREFIX$TOPICNAME", "", "", "", "", "", 0, 'No') &#0124; &#0124; warn "Execute: $DBI::errstr";
}

Now, the links are inserting fine, the categories are not. It wants to start the ID creation over. It wants to insert the link ID as ID #1.



------------------
- Jonathan Gamble

http://www.magicdirectory.com/




Quote Reply
Re: Parse_RDF.pl 1.11 issue In reply to
I figured out the problem.

Change everything under the old "#Category tag." to this:

Code:
# Category tag.
(($line =~ m,<catid,) or ($line =~ m,<tag catid,i)) and do {
next LINE if ($SKIP == 1);
if (! defined $TOPICNAME) {
die "Found category tag outside of topic at line: $.";
}
if ($line =~ s,<tag catid=\"([^"]+)"/>(.*),$2,i) {
$CATCNT = $CATCNT++;
$CAT{$TOPICNAME} = $CATCNT++;
redo LINE;
}
elsif ($line =~ s,<catid>(\d+)</catid>(.*),$2,i) {
$CATCNT = $CATCNT++;
$CAT{$TOPICNAME} = $CATCNT++;
redo LINE;
}
else {
my $count = 0;
while ($line .= <CONTENT_FILE> and chomp($line)) {
if ($line =~ s,<tag catid=\"([^"]+)"/>(.*),$2,i) {
$CATCNT = $CATCNT++;
$CAT{$TOPICNAME} = $CATCNT++;
redo LINE;
}
($count++ > $max_limit) and die "Can't find closing </catid> tag!";
}
}
last CASE;
};

I hope this helps,


------------------
- Mark Foster
http://www.linkondemand.com/