Skip to content

Commit 905daae

Browse files
committed
Fixed catch exception of decoding attributes.
1 parent a09ac8c commit 905daae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: web/websearch.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,10 @@ def prepareResultJson(result):
367367
res = {'rank': row['weight'], 'id': row['id']}
368368
for attr in r:
369369
if isinstance(r[attr], str):
370-
res[attr] = r[attr].decode('utf-8')
370+
try:
371+
res[attr] = r[attr].decode('utf-8')
372+
except:
373+
res[attr] = r[attr]
371374
else:
372375
res[attr] = r[attr]
373376
# Prepare bounding box from West/South/East/North attributes

0 commit comments

Comments
 (0)