UNQ_C10 TypeError on os.path.join(vocab_dir, vocab_file)

Hello, it seems the mbr_decode function cannot identify the vocabulary file.
Error output below. Please would it be possible to assist me?


TypeError Traceback (most recent call last)
in
----> 1 mbr_decode(your_sentence, 4, weighted_avg_overlap, jaccard_similarity, model, TEMPERATURE, vocab_file=VOCAB_FILE, vocab_dir=VOCAB_DIR)[0]

in mbr_decode(sentence, n_samples, score_fn, similarity_fn, NMTAttn, temperature, vocab_file, vocab_dir, generate_samples, sampling_decode, next_symbol, tokenize, detokenize)
39
40 # detokenize the token list associated with the max_score_key
—> 41 translated_sentence = detokenize(samples[max_score_key])
42
43 ### END CODE HERE ###

in detokenize(integers, vocab_file, vocab_dir)
52 integers = integers[:integers.index(EOS)]
53
—> 54 return trax.data.detokenize(integers, vocab_file=vocab_file, vocab_dir=vocab_dir)

/opt/conda/lib/python3.7/site-packages/trax/data/tf_inputs.py in detokenize(x, vocab_type, vocab_file, vocab_dir, n_reserved_ids)
485 A string corresponding to the de-tokenized version of x.
486 “”"
→ 487 vocab = _get_vocab(vocab_type, vocab_file, vocab_dir)
488 x_unreserved = np.array(x) - n_reserved_ids
489 return str(vocab.decode(x_unreserved.tolist()))

/opt/conda/lib/python3.7/site-packages/trax/data/tf_inputs.py in _get_vocab(vocab_type, vocab_file, vocab_dir, extra_ids)
578
579 vocab_dir = vocab_dir or ‘gs://trax-ml/vocabs/’
→ 580 path = os.path.join(vocab_dir, vocab_file)
581
582 if vocab_type == ‘subword’:

/opt/conda/lib/python3.7/posixpath.py in join(a, *p)
92 path += sep + b
93 except (TypeError, AttributeError, BytesWarning):
—> 94 genericpath._check_arg_types(‘join’, a, *p)
95 raise
96 return path

/opt/conda/lib/python3.7/genericpath.py in _check_arg_types(funcname, *args)
151 else:
152 raise TypeError('%s() argument must be str or bytes, not r'
→ 153 (funcname, s.class.name)) from None
154 if hasstr and hasbytes:
155 raise TypeError(“Can’t mix strings and bytes in path components”) from None

TypeError: join() argument must be str or bytes, not ‘NoneType’

Sorry I just realised had to include those as input to detokenize. Please ignore.