diff --git a/src/calibre/utils/icu.py b/src/calibre/utils/icu.py index 41f9abd0c2..584ae8ad45 100644 --- a/src/calibre/utils/icu.py +++ b/src/calibre/utils/icu.py @@ -282,10 +282,7 @@ def partition_by_first_letter(items, reverse=False, key=lambda x:x): string_length = _icu.string_length if is_narrow_build else len # Return the number of UTF-16 codepoints in a string -try: - utf16_length = len if is_narrow_build else _icu.utf16_length -except AttributeError: - utf16_length = len # People running from source +utf16_length = len if is_narrow_build else _icu.utf16_length ################################################################################