cldf / cldfviz

A python library providing tools to visualize data from CLDF datasets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Must guard against empty node labels

xrotwang opened this issue · comments

  File "/home/robert/venvs/ll/lib/python3.10/site-packages/cldfviz/tree.py", line 21, in clean_node_label
    s = s.replace(c, '_')
AttributeError: 'NoneType' object has no attribute 'replace'

def clean_node_label(s):
for c in RESERVED_PUNCTUATION:
s = s.replace(c, '_')
return s.replace(' ', '_')