igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Plotting --> AttributeError: 'bytes' object has no attribut


From: Tamas Nepusz
Subject: Re: [igraph] Plotting --> AttributeError: 'bytes' object has no attribute 'encode'
Date: Sun, 29 Jan 2017 22:51:13 +0100

Hi,

This is a known issue with python-igraph 0.7.1 and Python 3.x:

https://github.com/igraph/python-igraph/issues/88

You need to apply this patch manually to the source code to fix it:

https://github.com/igraph/python-igraph/commit/8864b46849b031a3013764d03e167222963c0f5d


T.

On Sun, Jan 29, 2017 at 9:45 PM, roberto franceschini <address@hidden> wrote:
Hello, in python I am doing

G = igraph.Graph.Full(10)
igraph.plot(G, bbox = (400,400), layout = G.layout('kk'))

and I get 

AttributeError                            Traceback (most recent call last)
/usr/local/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
    309             method = get_real_method(obj, self.print_method)
    310             if method is not None:
--> 311                 return method()
    312             return None
    313         else:

/usr/local/lib/python3.6/site-packages/igraph/drawing/__init__.py in _repr_svg_(self)
    352         surface.finish()
    353         # Return the raw SVG representation
--> 354         return io.getvalue().encode("utf-8")
    355 
    356     @property

AttributeError: 'bytes' object has no attribute 'encode'

I cannot find a match for this in google or stackoverflow. Since I have never used plots of iGraph before in Python I thought was best to ask.
Thanks for helping,
Roberto


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

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