def check_geo(geo):
    """ Checks a geo and makes sure the text fields are not binary """
    geo = copy.copy(geo)

    def fix_item(item):
        if isinstance(item, bytes):
            return item.decode()
        return item

    def fix_list(lst):
        return [fix_item(i) for i in lst]
    if isinstance(geo.reduce, bytes):
        geo.reduce = geo.reduce.decode()
    for key in geo.kwargs.keys():
        if geo.kwargs[key] is not None:
            if isinstance(geo.kwargs[key], (list, np.ndarray)):
                geo.kwargs[key] = fix_list(geo.kwargs[key])
            elif isinstance(geo.kwargs[key], bytes):
                geo.kwargs[key] = fix_item(geo.kwargs[key])
    return geo
 Checks a geo and makes sure the text fields are not binary 
hypertools/_shared/helpers.py