0

The newly added functionality of Pyvis allows to filter and select nodes within a graph. This functionality provides for great use in medium-sized networks (although some may have several hundred nodes). Unfortunately, it appears that UTF-8 texts are having a problem. The selection menu does not display words that contain UTF-8 characters, such as Hebrew and Arabic words. But, and this surprises me, the filtering tool worked. Perhaps there is a nuance in the way they represent the characters that cause this inconsistency. Here is a mini example that can be used to reproduce the bug:

The first case (selection):

from pyvis.network import Network

net = Network(height="750px", width="100%", bgcolor="#222222", font_color="white",
                  select_menu=True)
net.add_nodes(['אברהם', 'שרה'])
net.add_edge('אברהם', 'שרה')
net.show('select.html')

The second case (filtering):

from pyvis.network import Network

net = Network(height="750px", width="100%", bgcolor="#222222", font_color="white",
                  filter_menu=True)
net.add_nodes(['אברהם', 'שרה'])
net.add_edge('אברהם', 'שרה')
net.show('filter.html')

The second case works as expected, while the first case displays the words as ????-??? image

image

Is there a way to resolve this issue and display the UTF-8 characters in the selection menu as well?

BTW, on the GitHub project page, I noted the problem as well.

Yanirmr
  • 923
  • 8
  • 25

0 Answers0