From 3746562f81a876c771eeec6a155c109b772b91da Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 8 Feb 2021 11:33:15 +0530 Subject: [PATCH] Fix #1914954 [ValueError: could not convert string to float: 'XV'](https://bugs.launchpad.net/calibre/+bug/1914954) --- src/calibre/ebooks/metadata/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index 240900a3a2..cdad5f6ff7 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -220,7 +220,7 @@ def fmt_sidx(i, fmt='%.2f', use_roman=False): i = 1 try: i = float(i) - except TypeError: + except Exception: return unicode_type(i) if int(i) == float(i): return roman(int(i)) if use_roman else '%d'%int(i)