zhiguowang / BiMPM

BiMPM: Bilateral Multi-Perspective Matching for Natural Language Sentences
Apache License 2.0
438 stars 150 forks source link

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

Open tamio96 opened 6 years ago

tamio96 commented 6 years ago

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,

guotong1988 commented 5 years ago

python2, not python3