Skip to content

Commit

Permalink
Fixed multiple character emoji tcl exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieboldianus committed Aug 8, 2018
1 parent 1ced92c commit fc149f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tagmaps/__main__.py
Expand Up @@ -977,6 +977,7 @@ def is_number(s):
overallNumOfUsersPerTag_global.update(taghash)

global topTagsList
print_store_log(f"Total unique tags: {len(overallNumOfUsersPerTag_global)}")
topTagsList = overallNumOfUsersPerTag_global.most_common(tmax)
#remove all tags that are used by less than x {limitBottomUserCount} photographers
if removeLongTail is True:
Expand Down Expand Up @@ -1496,7 +1497,8 @@ def delete(listbox):
try:
listbox.insert(tk.END, f'{item[0]} ({item[1]} user)')
except tk.TclError:
emoji = unicode_name(item[0]) #Utils.with_surrogates()
#print(item[0].encode("utf-8"))
emoji = "".join(unicode_name(c) for c in item[0]) #Utils.with_surrogates()
listbox.insert(tk.END, f'{emoji} ({item[1]} user)')
canvas.pack(fill='both',padx=0, pady=0)
listboxFrame.pack(fill='both',padx=0, pady=0)
Expand Down

0 comments on commit fc149f8

Please sign in to comment.