ompugao / english_words_battle

MIT License
1 stars 0 forks source link

IndexError: list index out of range #25

Closed tiwanari closed 6 years ago

tiwanari commented 6 years ago

死んでました〜 unswerving

Traceback (most recent call last):
  File "main.py", line 112, in scrape_word_data
    meaning = pq.find('#resultsList > ul:nth-child(2) > li:nth-child(1) > div:nth-child(2) > ol:nth-child(2) > li:nth-child(1)')[0].text_content()
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "main.py", line 232, in <module>
    main()
  File "main.py", line 215, in main
    message = create_answer_message(phrase)
  File "main.py", line 157, in create_answer_message
    meaning, pronunciation = scrape_word_data(phrase)
  File "main.py", line 115, in scrape_word_data
    meaning = '-%s\n'%(e.message,)
AttributeError: 'IndexError' object has no attribute 'message'