diff --git a/plwn/storages/sqlite.py b/plwn/storages/sqlite.py index 781c5cc338f5ebe8edc5f44a74a72184dc0ec1b4..4405789c3a58536deb0a560149d0fde49d877a3d 100644 --- a/plwn/storages/sqlite.py +++ b/plwn/storages/sqlite.py @@ -787,7 +787,11 @@ class LexicalUnit(bs.LexicalUnitBase): u"SELECT quote(id) from tbl_lexicalunit WHERE id = ?", (self._id,), ) - self._uuid = cur.fetchone()[0][2:-1] + temp = cur.fetchone()[0] + if isinstance(temp, str): + self._uuid = temp[2:-1] + else: + self._uuid = temp return self._uuid @property @@ -1150,7 +1154,11 @@ class Synset(bs.SynsetBase): u"SELECT quote(id) from tbl_synset WHERE id = ?", (self._id,), ) - self._uuid = cur.fetchone()[0][2:-1] + temp = cur.fetchone()[0] + if isinstance(temp, str): + self._uuid = temp[2:-1] + else: + self._uuid = temp return self._uuid @property