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

Issue in running python extract_vocab.py #45

Open
DevalNaik opened this issue Mar 7, 2019 · 3 comments
Open

Issue in running python extract_vocab.py #45

DevalNaik opened this issue Mar 7, 2019 · 3 comments

Comments

@DevalNaik
Copy link

Error while loading word embedding glove

Logs:
Loading from original dataset
Loading data from data/train_tok.jsonl
Loading data from data/train_tok.tables.jsonl
Loading data from data/dev_tok.jsonl
Loading data from data/dev_tok.tables.jsonl
Loading data from data/test_tok.jsonl
Loading data from data/test_tok.tables.jsonl
Loading word embedding from glove/glove.42B.300d.txt
Traceback (most recent call last):
File "extract_vocab.py", line 23, in
use_small=USE_SMALL)
File "C:\Users\SQLNet\sqlnet\utils.py
", line 274, in load_word_emb
for idx, line in enumerate(inf):
File "C:\Users\miniconda3\lib\encodings\cp1252.py", line 23, in dec
ode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2438: cha
racter maps to

@DevalNaik
Copy link
Author

DevalNaik commented Mar 7, 2019

Error while loading word embedding glove

Logs:
Loading from original dataset
Loading data from data/train_tok.jsonl
Loading data from data/train_tok.tables.jsonl
Loading data from data/dev_tok.jsonl
Loading data from data/dev_tok.tables.jsonl
Loading data from data/test_tok.jsonl
Loading data from data/test_tok.tables.jsonl
Loading word embedding from glove/glove.42B.300d.txt
Traceback (most recent call last):
File "extract_vocab.py", line 23, in
use_small=USE_SMALL)
File "C:\Users\SQLNet\sqlnet\utils.py
", line 274, in load_word_emb
for idx, line in enumerate(inf):
File "C:\Users\miniconda3\lib\encodings\cp1252.py", line 23, in dec
ode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2438: cha
racter maps to

Execution is started with following changes in utils.py at row#273
with open(file_name,encoding="utf8") as inf:

@siddharthchauhan
Copy link

Check your folder structure for data, Is your train_tok.jsonl under data folder or data/data/train_tok.jsonl?

@shambhaviparashar
Copy link

thanks for editing @DevalNaik

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

3 participants