We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It seems loads in msgpack-python 1.0 now returns a string (it was bytes previously), so doing
loads
asciinet/pyasciinet/asciinet/__init__.py
Line 84 in cec4d1f
and then a decode() in
decode()
Line 108 in cec4d1f
results in an error.
The text was updated successfully, but these errors were encountered:
The solution would be something like:
pyasciinet/asciinet/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyasciinet/asciinet/__init__.py b/pyasciinet/asciinet/__init__.py index 1a81b84..e9c3659 100644 --- a/pyasciinet/asciinet/__init__.py +++ b/pyasciinet/asciinet/__init__.py @@ -104,5 +104,8 @@ def _cleanup(): def graph_to_ascii(graph, timeout=10): if not isinstance(graph, nx.Graph): raise ValueError('graph must be a networkx.Graph') - - return _asciigraph.graph_to_ascii(graph, timeout=timeout).decode(encoding='UTF-8') + + try: + return _asciigraph.graph_to_ascii(graph, timeout=timeout).decode(encoding='UTF-8') + except: + return _asciigraph.graph_to_ascii(graph, timeout=timeout)
Sorry, something went wrong.
Thanks for the fix. Just found and installed asciinet. Have been looking for exactly this (networkx to ascii graphs) for ages! Hope it gets some love.
No branches or pull requests
It seems
loads
in msgpack-python 1.0 now returns a string (it was bytes previously), so doingasciinet/pyasciinet/asciinet/__init__.py
Line 84 in cec4d1f
and then a
decode()
inasciinet/pyasciinet/asciinet/__init__.py
Line 108 in cec4d1f
results in an error.
The text was updated successfully, but these errors were encountered: