[SOLVED] "Unknown node id" and nodes added during the import

Get help with your data
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:
[SOLVED] "Unknown node id" and nodes added during the import

Post by seinecle » 16 Jul 2010 12:39

Hi,

I have a GEXF file with 835 nodes. Nodes' ids are integers from 1 to 835.

When importing my GEXF file, the import report lists 5 issues:
Unknow Node id WARNING
Unknow Node id WARNING
Unknow Node id WARNING
Unknow Node id WARNING
Unknow Node id WARNING


The report shows more details:

Unknow Node id
Automatic node creation from id=arg
Unknow Node id
Automatic node creation from id=135
Unknow Node id
Automatic node creation from id=sou
Unknow Node id
Automatic node creation from id=546
Unknow Node id
Automatic node creation from id=681
Node attribute found 'discipline' (STRING)
Edge property found: weight
GEXF version 1.0 (deprecated)

I accept the report, which opens the graph. I export the graph in GEXF to have a look at it. It looks like Gephi has added five nodes to the original list:

[after my 835 nodes, now I find:]

<node id="arg" label="arg">
</node>
<node id="135" label="135">
</node>
<node id="sou" label="sou">
</node>
<node id="546" label="546">
</node>
<node id="681" label="681">
</node>



What happened to the nodes 135, 546 and 681 from my original file? Their ids have been changed:

Node 135:
<node id=" id" label="label_135">
</node>


Node 546:
<node id="l="" label="label_546">
</node>

Node 681:
<node id="ues" label="label_681">
</node>


Any help on this strange behavior?

Thx!

Clement

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: "Unknown node id" and nodes added during the import

Post by mbastian » 16 Jul 2010 16:46

Yes, currently gephi creates nodes when they are missing. If you have an edge like

<edge source="ABC" target="RGR" weight="1" />

and there is no node with "ABC" id, this node will be created. That means there may be an issue with your input data, as edges references unknow nodes.

In the 0.7beta, I've added a checkbox in the Import Report not to add these automatically created nodes.

User avatar
seinecle
Gephi Community Support
Posts:546
Joined:08 Feb 2010 16:55
Location:Lyon, France
Contact:

Re: "Unknown node id" and nodes added during the import

Post by seinecle » 19 Jul 2010 08:25

Thx!

The nodes gephi created already existed: in my original file, all nodes mentioned in the declaration of edges were also listed in the nodes' list. So there should really be no new node created. I was still puzzled ...

I just solved my problem by upgrading my gexf file to the 1.1 version. The import works like a charm now!

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable