can't import edges table

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
christopher
Posts:2
Joined:24 Jun 2016 00:03
[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
can't import edges table

Post by christopher » 24 Jun 2016 00:29

Hi Gephi community,

I'm having trouble importing data into Gephi 0.9.1 from a CSV file. Importing nodes works normally, but Gephi won't accept any edges CSV I give it without showing the error message: "Edges table needs a 'Source' and 'Target' column with nodes ids". A simple example is attached. I have tried importing nodes first, then edges. I have tried integers and strings (or rather numbers and letters as node ids). I also checked TSV and CSV files, and tried shortening the edge table to a source and target column only, but still get this error message.

I have checked for updates in Gephi, and tried this both on Mac OS 10.9 and Xubuntu 16.04 and get the same result. It's probably an obvious step I have missed - can anyone help please?

Cheers
Chris
Attachments
edges_import_error.png

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: can't import edges table

Post by eduramiba » 24 Jun 2016 08:34

Hi Chris,
Make sure your column headers don't have trailing spaces.

christopher
Posts:2
Joined:24 Jun 2016 00:03
[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: can't import edges table

Post by christopher » 25 Jun 2016 10:34

Thanks, this got me back on track. It wasn't a trailing space, but an internal one where I thought there was only a tab. Removing all whitespace and using comma as the delimiter got it working.

Cheers
Chris

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