You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to use your algorithm with a NetworkX MultiDiGraph but I obtain the following error:
MultiDiGraph with 97 nodes and 506 edges
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
line 256, in process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 63, in perform_simulation
side = perform_random_walk(g, start_node, other_nodes, user_nodes_side2) # get the side we endend after the random walk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 22, in perform_random_walk
current_node = random.choice([ for _ in g.neighbors(current_node)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 370, in choice
raise IndexError('Cannot choose from an empty sequence')
IndexError: Cannot choose from an empty sequence
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
line 48, in
rwc_score = get_rwc(G, republican_nodes, democratic_nodes, node_percentage, number_simulations)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 124, in get_rwc
simulation_frequencies = future.result()
^^^^^^^^^^^^^^^
line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
line 401, in __get_result
raise self._exception
IndexError: Cannot choose from an empty sequence
Process finished with exit code 1
Do you know how can I solve?
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to use your algorithm with a NetworkX MultiDiGraph but I obtain the following error:
MultiDiGraph with 97 nodes and 506 edges
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
line 256, in process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 63, in perform_simulation
side = perform_random_walk(g, start_node, other_nodes, user_nodes_side2) # get the side we endend after the random walk
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 22, in perform_random_walk
current_node = random.choice([ for _ in g.neighbors(current_node)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 370, in choice
raise IndexError('Cannot choose from an empty sequence')
IndexError: Cannot choose from an empty sequence
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
line 48, in
rwc_score = get_rwc(G, republican_nodes, democratic_nodes, node_percentage, number_simulations)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
line 124, in get_rwc
simulation_frequencies = future.result()
^^^^^^^^^^^^^^^
line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
line 401, in __get_result
raise self._exception
IndexError: Cannot choose from an empty sequence
Process finished with exit code 1
Do you know how can I solve?
The text was updated successfully, but these errors were encountered: