artyompetrov / AutoDefine_oxfordlearnersdictionaries

An add-on to Anki that auto-defines words and images.
GNU General Public License v2.0
17 stars 10 forks source link

Error appears #25

Open Geniusssmit opened 7 months ago

Geniusssmit commented 7 months ago

Describe the bug error appears

To Reproduce Add a word oss, open browser, click a button to add definition audio, definition, ipa are enabled

Debug info:

Additional context (e.g., exception)

Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.64 (581f82c5) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19043
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2024-03-06 13:53:05

Caught exception:
Traceback (most recent call last):
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 798, in get_data_with_exception_handling
    get_data(note, is_bulk=False)
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 284, in get_data
    raise error
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 233, in get_data
    words_info = get_words_info(word)
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 316, in get_words_info
    word_info = Word.info()
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\oxford.py", line 541, in info
    'id': cls.id(),
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\oxford.py", line 225, in id
    return cls.soup_data.select(cls.entry_selector)[0].attrs['id']
IndexError: list index out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "aqt.webview", line 604, in handler
  File "aqt.editor", line 582, in <lambda>
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 823, in <lambda>
    func=lambda ed: ed.saveNow(lambda: get_data_with_exception_handling(ed)),
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 808, in get_data_with_exception_handling
    raise Exception("\n\nATTENTION! Please copy this error massage and open an issue on \n"
Exception: 

ATTENTION! Please copy this error massage and open an issue on 
https://github.com/artyompetrov/AutoDefine_oxfordlearnersdictionaries/issues 
so I could investigate the reason of error and fix it
Geniusssmit commented 7 months ago

same with the word accismus

An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.64 (581f82c5) Python 3.9.15 Qt 6.4.3 PyQt 6.4.0
Platform: Windows-10-10.0.19043
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2024-03-06 13:53:05

Caught exception:
Traceback (most recent call last):
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 798, in get_data_with_exception_handling
    get_data(note, is_bulk=False)
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 284, in get_data
    raise error
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 233, in get_data
    words_info = get_words_info(word)
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 316, in get_words_info
    word_info = Word.info()
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\oxford.py", line 541, in info
    'id': cls.id(),
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\oxford.py", line 225, in id
    return cls.soup_data.select(cls.entry_selector)[0].attrs['id']
IndexError: list index out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "aqt.webview", line 604, in handler
  File "aqt.editor", line 582, in <lambda>
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 823, in <lambda>
    func=lambda ed: ed.saveNow(lambda: get_data_with_exception_handling(ed)),
  File "C:\Users\Paul\AppData\Roaming\Anki2\addons21\AutoDefineAddon\autodefine.py", line 808, in get_data_with_exception_handling
    raise Exception("\n\nATTENTION! Please copy this error massage and open an issue on \n"
Exception: 

ATTENTION! Please copy this error massage and open an issue on 
https://github.com/artyompetrov/AutoDefine_oxfordlearnersdictionaries/issues 
so I could investigate the reason of error and fix it