Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vocabs are not valid utf-8 #2

Closed
sr229 opened this issue Dec 7, 2017 · 1 comment
Closed

vocabs are not valid utf-8 #2

sr229 opened this issue Dec 7, 2017 · 1 comment

Comments

@sr229
Copy link

sr229 commented Dec 7, 2017

Backtrace :

  File "/projects/MonikaDesu-Rebecca/src/data_utils.py", line 137, in prepare_custom_data
    data_to_token_ids(train_enc, enc_train_ids_path, enc_vocab_path, tokenizer)
  File "/projects/MonikaDesu-Rebecca/src/data_utils.py", line 112, in data_to_token_ids
    vocab, _ = initialize_vocabulary(vocabulary_path)
  File "/projects/MonikaDesu-Rebecca/src/data_utils.py", line 87, in initialize_vocabulary
    rev_vocab.extend(f.readlines())
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 131, in readlines
    s = self.readline()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py", line 124, in readline
    return compat.as_str_any(self._read_buf.ReadLineAsString())
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/compat.py", line 106, in as_str_any
    return as_str(value)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/compat.py", line 84, in as_text
    return bytes_or_text.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1: invalid start byte
@sr229
Copy link
Author

sr229 commented Dec 13, 2017

Probably fixed by dbddeb1, re-open if persistent

@sr229 sr229 closed this as completed Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant