You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you for this wonderful piece of software. It can save a lot of time.
I'm using it to extract certain data from online Oxford dictionary: Pronunciation transcription in phonetics symbols. A friend of mine helped me to rewrite the code to get extract this type of information as by default the add-on was able to extract a different type of info (a type of speech: verb noun, etc.)
By adding last three line of code in 'oxford.py' we were able to fetch data I wanted to go into my anki deck.
#-*- coding:utf-8 -*-
import urllib2
from urllib2 import quote
import json
from aqt.utils import showInfo
from .base import WebService, export, register, with_styles
@register("Oxford")
class Oxford(WebService):
The problem occurs when addon fetches data from online dictionary and dictionary does not have a record for a particular word. This is the error message:
An error occurred in an add-on.
Please post on the add-on forum: https://anki.tenderapp.com/discussions/add-ons
Traceback (most recent call last):
File "C:\Users\kodi\AppData\Roaming\Anki2\addons\wquery\query.py", line 324, in run
result = self.query(service_field, word)
File "C:\Users\kodi\AppData\Roaming\Anki2\addons\wquery\query.py", line 337, in query
return self.service.active(service_field, word)
File "C:\Users\kodi\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 173, in active
result = each1
File "C:\Users\kodi\AppData\Roaming\Anki2\addons\wquery\service\base.py", line 58, in _deco
res = fld_func(cls, *args, **kwargs)
File "C:\Users\kodi\AppData\Roaming\Anki2\addons\wquery\service\oxford.py", line 32, in _fld_category
s += self._get_from_api()[0]["lexicalEntries"][0]["pronunciations"][0]["phoneticSpelling"]
KeyError: 'pronunciations'
After I click 'OK' on the error screen process is continued ... until next error message.
Is there are a way to get rid of this error message?
Wrong behavior
When it happened
Whether it can be reproduced
The text was updated successfully, but these errors were encountered:
Hi,
First of all, thank you for this wonderful piece of software. It can save a lot of time.
I'm using it to extract certain data from online Oxford dictionary: Pronunciation transcription in phonetics symbols. A friend of mine helped me to rewrite the code to get extract this type of information as by default the add-on was able to extract a different type of info (a type of speech: verb noun, etc.)
By adding last three line of code in 'oxford.py' we were able to fetch data I wanted to go into my anki deck.
The problem occurs when addon fetches data from online dictionary and dictionary does not have a record for a particular word. This is the error message:
After I click 'OK' on the error screen process is continued ... until next error message.
Is there are a way to get rid of this error message?
Wrong behavior
When it happened
Whether it can be reproduced
The text was updated successfully, but these errors were encountered: