diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index 9ed18d5a84..6c1fa0c4fb 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -1771,7 +1771,10 @@ class DeviceMixin(object): # {{{ string_pat = re.compile(r'(?u)\W|[_]') def clean_string(x): - x = x.lower() if x else '' + try: + x = x.lower() if x else '' + except Exception: + x = '' return string_pat.sub('', x) update_metadata = (