Skip to content

Commit

Permalink
Fixing a UnboundLocalError: local variable 'emb' referenced before as…
Browse files Browse the repository at this point in the history
…signment
  • Loading branch information
Pasquale Minervini committed Oct 25, 2017
1 parent 6538e64 commit 8694565
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jack/util/vocab.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ def load(self, path: str):
conf_file = os.path.join(path, "conf.yaml")
emb_file = os.path.join(path, "emb.pkl")
remainder_file = os.path.join(path, "remainder.pkl")

emb = None

if os.path.exists(conf_file):
with open(conf_file, "r") as f:
config = yaml.load(f)
Expand Down

0 comments on commit 8694565

Please sign in to comment.