BiMPM icon indicating copy to clipboard operation
BiMPM copied to clipboard

AttributeError: 'dict' object has no attribute 'has_key'

Open tamio96 opened this issue 6 years ago • 1 comments

I got this error when run: python SentenceMatchTrainer.py --config_path /home/tamiomusic/BiMPM/con figs/quora.sample.config

I only change quora.sample.config to fix with files' directory: "train_path": "/home/tamiomusic/BiMPM/quora/train.tsv", "dev_path": "/home/tamiomusic/BiMPM/quora/dev.tsv", "word_vec_path": "/home/tamiomusic/BiMPM/quora/wordvec.txt", "model_dir": "/home/tamiomusic/BiMPM/quora/logs"

Full log: Loading the configuration from /home/tamiomusic/BiMPM/configs/snli.sample.config Traceback (most recent call last): File "SentenceMatchTrainer.py", line 251, in FLAGS = enrich_options(FLAGS) File "SentenceMatchTrainer.py", line 201, in enrich_options if not options.dict.has_key("in_format"): AttributeError: 'dict' object has no attribute 'has_key'

Best regards,

tamio96 avatar Sep 28 '18 08:09 tamio96

python2, not python3

guotong1988 avatar Nov 28 '18 01:11 guotong1988