Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge from label is always null string "" #5

Closed
rjurney opened this issue Aug 23, 2014 · 9 comments
Closed

Edge from label is always null string "" #5

rjurney opened this issue Aug 23, 2014 · 9 comments
Labels

Comments

@rjurney
Copy link

rjurney commented Aug 23, 2014

{
"edges": [
{
"": "AmazonWebServices",
"weight": 1.0,
"directed": true
},
{
"": "Cloudera",
"weight": 1.0,
"directed": true
},
{
"": "Mapr",
"weight": 1.0,
"directed": true
},
{
"": "Hortonworks",
"weight": 1.0,
"directed": true
},
{
"": "At&T",
"weight": 2.0,
"directed": true
},
{
"": "HewlattPackard",
"weight": 1.0,
"directed": true
},
{
"": "Google",
"weight": 1.0,
"directed": true
},
{
"": "Polycom",
"weight": 1.0,
"directed": true
},
{
"": "Ibm",
"weight": 1.0,
"directed": true
},
...
]
}

@bfontaine bfontaine added the bug label Aug 23, 2014
@bfontaine
Copy link
Owner

Hello,
Could you please provide a minimal code example to reproduce the issue?

@rjurney
Copy link
Author

rjurney commented Aug 23, 2014

https://gist.github.com/rjurney/726433d4a36daa7cc17d

That file loaded with GDF::load() reproduces the issue.

bfontaine added a commit that referenced this issue Aug 23, 2014
@bfontaine
Copy link
Owner

Thanks, I can confirm the bug, I’ll work on it.

@rjurney
Copy link
Author

rjurney commented Aug 23, 2014

Thanks, also I can't build the gem :(

Russells-MacBook-Pro:Graphs.rb rjurney$ gem cert --add <(curl -Ls https://gist.github.com/bfontaine/5233818/raw/gem-public-key.pem)
Added '/CN=batifon/DC=yahoo/DC=fr'

Russells-MacBook-Pro:Graphs.rb rjurney$ gem build graphs.gemspec
ERROR: While executing gem ... (Gem::Security::Exception)
certificate /CN=batifon/DC=yahoo/DC=fr does not match the signing key

bfontaine added a commit that referenced this issue Aug 24, 2014
@bfontaine
Copy link
Owner

I fixed the issue and released the v0.2.0. Regarding the building issue I guess you’d have to sign with your own key but I’m not sure.

@rjurney
Copy link
Author

rjurney commented Aug 28, 2014

Now I get this issue when parsing a GDF file:

jruby-1.7.4 :005 > g = GDF::load('../data/BigHadoopPartner.gdf')
CSV::MalformedCSVError: Missing or stray quote in line 1
from /Users/rjurney/.rvm/rubies/jruby-1.7.4/lib/ruby/1.9/csv.rb:1895:in shift' from org/jruby/RubyArray.java:1617:ineach'
from /Users/rjurney/.rvm/rubies/jruby-1.7.4/lib/ruby/1.9/csv.rb:1887:in shift' from org/jruby/RubyKernel.java:1489:inloop'
from /Users/rjurney/.rvm/rubies/jruby-1.7.4/lib/ruby/1.9/csv.rb:1849:in shift' from /Users/rjurney/.rvm/rubies/jruby-1.7.4/lib/ruby/1.9/csv.rb:1396:inparse_line'
from /Users/rjurney/.rvm/rubies/jruby-1.7.4/lib/ruby/1.9/csv.rb:2354:in parse_csv' from /Users/rjurney/.rvm/gems/jruby-1.7.4/gems/graphs-0.2.0/lib/graphs/gdf.rb:101:inparse'
from org/jruby/RubyString.java:7127:in each_line' from /Users/rjurney/.rvm/gems/jruby-1.7.4/gems/graphs-0.2.0/lib/graphs/gdf.rb:85:inparse'
from /Users/rjurney/.rvm/gems/jruby-1.7.4/gems/graphs-0.2.0/lib/graphs/gdf.rb:63:in load' from (irb):5:inevaluate'
from org/jruby/RubyKernel.java:1093:in eval' from org/jruby/RubyKernel.java:1489:inloop'
from org/jruby/RubyKernel.java:1254:in catch' from org/jruby/RubyKernel.java:1254:incatch'
from /Users/rjurney/.rvm/rubies/jruby-1.7.4/bin/irb:13:in `(root)'jruby-1.7.4 :006 >

Line 1-2 looks like:

nodedef> name VARCHAR,label VARCHAR,width DOUBLE,height DOUBLE,x DOUBLE,y DOUBLE,color VARCHAR,group INTEGER,PageRank DOUBLE default 0.0,Modularity Class INTEGER default 0
Auren,"Auren",1.0028039,1.0028039,1169.1615,473.4499,'30,110,229',2,1.4706891233271104E-4,13

@rjurney
Copy link
Author

rjurney commented Aug 28, 2014

Actually, this line is messing it up:

LINE: Securboration,,","Securboration,",1.0017138,1.0017138,868.6553,-414.62808,'30,229,205',1,1.4695786844141188E-4,4

@bfontaine
Copy link
Owner

You have an unclosed quote here:

Securboration,,","Securboration,",1.0017138,1.0017138,868.6553,-414.62808,'30,229,205',1,1.4695786844141188E-4,4
               ^

The parser thinks you open a quote for a field but it’s never closed, hence the error.

Edit: in fact, this part is strange: ","Securboration,". What are these quotes for?

@rjurney
Copy link
Author

rjurney commented Aug 28, 2014

Thanks, yeah. I have many corrupted lines. I must clean Gephi's output before loading it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants