Skip to content

Can't draw Graph with any_hashable = True, what should i do? #14

@Sjunhao

Description

@Sjunhao

Here have some info
`
Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb
return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

File "_ctypes/callbacks.c", line 234, in 'calling callback function'

File "F:\python36\lib\site-packages\jgrapht\algorithms\drawing.py", line 67, in actual_vertex_comparator_cb

return vertex_comparator_cb(v1, v2)

TypeError: 'NoneType' object is not callable

Traceback (most recent call last):

...

Graph.drawing.draw_matplotlib.draw_jgrapht(G)

File "F:\python36\lib\site-packages\jgrapht\drawing\draw_matplotlib.py", line 119, in draw_jgrapht

positions = layout(g, name=kwargs.get('name'))

File "F:\python36\lib\site-packages\jgrapht\drawing\draw_matplotlib.py", line 770, in layout

x, y = result.get_vertex_location(i)

File "F:\python36\lib\site-packages\jgrapht_internals_anyhashableg_drawing.py", line 18, in get_vertex_location

vertex = _vertex_anyhashableg_to_g(self._graph, vertex)

File "F:\python36\lib\site-packages\jgrapht_internals_anyhashableg.py", line 797, in _vertex_anyhashableg_to_g

return graph._vertex_hash_to_id[vertex] if vertex is not None else None

KeyError: 0

`

The Graph vertex is a new class. it can work, but can't drawing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions