Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit fc25d02

Browse files
[emoji] Make sure cache location exists
Close albertlauncher/albert#1521
1 parent dd2d795 commit fc25d02

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

emoji/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from albert import *
1313

1414
md_iid = "3.0"
15-
md_version = "3.0"
15+
md_version = "3.1"
1616
md_name = "Emoji"
1717
md_description = "Find and copy emojis by name"
1818
md_license = "MIT"
@@ -160,8 +160,10 @@ def get_annotations(cache_path: Path, use_derived: bool) -> dict:
160160
json_derived = json.load(file_derived)['annotationsDerived']['annotations']
161161
return json_full | json_derived
162162

163-
emojis = get_fully_qualified_emojis(self.cacheLocation())
164-
annotations = get_annotations(self.cacheLocation(), self.use_derived)
163+
cache_location = self.cacheLocation()
164+
cache_location.mkdir(parents=True, exist_ok=True)
165+
emojis = get_fully_qualified_emojis(cache_location)
166+
annotations = get_annotations(cache_location, self.use_derived)
165167

166168
def remove_redundancy(sentences):
167169
sets_of_words = [set(sentence.lower().split()) for sentence in sentences]

0 commit comments

Comments
 (0)