From 84318f6ee16c1f453d26464c4414f0e36262c39c Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Tue, 28 Oct 2014 17:01:17 -0700 Subject: [PATCH] 8152: Error converting database after upgrade to Gramps 4.1.1 --- gramps/gen/db/upgrade.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/gen/db/upgrade.py b/gramps/gen/db/upgrade.py index 957783202..b8b6e4804 100644 --- a/gramps/gen/db/upgrade.py +++ b/gramps/gen/db/upgrade.py @@ -656,7 +656,9 @@ def gramps_upgrade_16(self): private) LOG.debug(" upgrade new_source %s" % [new_source]) with BSDDBTxn(self.env, self.source_map) as txn: - txn.put(str(handle), new_source) + if isinstance(handle, UNITYPE): + handle = handle.encode('utf-8') + txn.put(handle, new_source) self.update() LOG.debug("%d sources upgraded with %d citations in %d seconds" %