title/collection can be unicode

This commit is contained in:
Jan Gerber 2015-09-22 10:38:05 +01:00
parent a30e8df593
commit 52746ea0ed
1 changed files with 2 additions and 2 deletions

View File

@ -37,8 +37,8 @@ def get_frame(id, height, position):
def get_hue(collection, title):
return ox.getHSL(
[int(''.join(x), 16) for x in zip(
hashlib.sha1(collection).hexdigest()[:3],
hashlib.sha1(title).hexdigest()[:3]
hashlib.sha1(collection.encode('utf-8')).hexdigest()[:3],
hashlib.sha1(title.encode('utf-8')).hexdigest()[:3]
)]
)[0]