igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] error calling g.simplify()


From: Ahmed Abdeen Hamed
Subject: Re: [igraph] error calling g.simplify()
Date: Wed, 12 Feb 2014 21:16:36 -0500

This was very helpful and it drove me nuts all afternoon long. This particular fix helped me with two issues.

Thanks so much for this help!

-Ahmed



On Wed, Feb 12, 2014 at 5:49 PM, Tamás Nepusz <address@hidden> wrote:
Hi Ahmed,

I have checked your CSV file. Line 633433 contains three entries, not two. The DictReader class from Python will convert this into a dictionary where there are three keys: “source", “target” and None. None (as a Python object) then ends up as an attribute name for edges, and this is something that the Python interface is not prepared for (because it shouldn’t happen anyway), so you get the error message that you’ve seen. Fix line 633433 in your file and it should be okay. In the meanwhile, I will fix the Graph.DictList() method to ensure that this yields an exception during the construction of the graph.

--
T.

>
> On Wed, Feb 12, 2014 at 3:09 PM, Tamás Nepusz <address@hidden (mailto:address@hidden)> wrote:
> > Hello,
> >
> > Yes, it’s likely to be a character encoding issue or something like that. I would need to see the CSV file and the code you used to construct the graph to say more about this. Please do not send the CSV file to the list; send it directly to me instead or upload it somewhere and send me the URL.
> >
> > --
> > T.
> >
> >
> > On Wednesday, 12 February 2014 at 17:41, Ahmed Abdeen Hamed wrote:
> >
> > > Hello friends,
> > >
> > > I load my graph from a CSV file and I think call the g.simplify() function, then I get this error:
> > >
> > > TypeError: string or unicode object expected
> > >
> > > Unless I am mistaken, there might be a character encoding issues in one of my nodes. I just don't know what line number this is. Any clue on how to resolve this error?
> > >
> > > Thanks very much,
> > >
> > > -Ahmed
> > > _______________________________________________
> > > igraph-help mailing list
> > > address@hidden (mailto:address@hidden) (mailto:address@hidden)
> > > https://lists.nongnu.org/mailman/listinfo/igraph-help
> >
>
>
>
> Attachments:
> - mesh-rules.csv
>
> - toy-network-mining.py
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]