am-silex / anki_cambridge Goto Github PK
View Code? Open in Web Editor NEWAnki Add-on for integration with Cambridge Dictionary web site
Anki Add-on for integration with Cambridge Dictionary web site
When you add English phrasal verbs such as "come along, go for, go out" and etc. audio files contain only first word.
For example, when I add "come along" by https://dictionary.cambridge.org/dictionary/english/come-along it's add audio records (both UK and US) with just one word - "come", but "come along" is expected.
Keep getting the following error.
Fetching failed:
Traceback (most recent call last):
File "/Users/XXXXX/Library/Application Support/Anki2/addons21/1875288089/gui.py", line 538, in run
self._fetch_wordlist()
File "/Users/XXXXX/Library/Application Support/Anki2/addons21/1875288089/gui.py", line 568, in _fetch_wordlist
self.downloader.fetch_wordlist_entries(wordlist_id)
File "/Users/XXXXX/Library/Application Support/Anki2/addons21/1875288089/Cambridge.py", line 323, in fetch_wordlist_entries
response = urlopen(self.req)
File "urllib/request.py", line 222, in urlopen
File "urllib/request.py", line 525, in open
File "urllib/request.py", line 542, in _open
File "urllib/request.py", line 502, in _call_chain
File "urllib/request.py", line 1393, in https_open
File "urllib/request.py", line 1350, in do_open
File "http/client.py", line 1255, in request
File "http/client.py", line 1296, in _send_request
File "http/client.py", line 1228, in putheader
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)
The "…" is in the cookie fyi.
edit: It appears that firefox abbreviates the cookie, hence the ellipsis. Copying it from raw works fine.
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-14.2.1-x86_64-i386-64bit
Anki message :
The following add-ons failed to load:
Cambridge Dictionary
They may need to be updated to support this version of Anki. Click the Check for Updates button to see if any updates are available.
You can use the Copy Debug Info button to get information that you can paste in a report to the add-on author.
For add-ons that don't have an update available, you can disable or delete the add-on to prevent this message from appearing.
Debug info:
When loading Cambridge Dictionary:
Traceback (most recent call last):
File "aqt.addons", line 245, in loadAddons
File "/Users/den/Library/Application Support/Anki2/addons21/1875288089/init.py", line 19, in
from . import main
File "/Users/den/Library/Application Support/Anki2/addons21/1875288089/main.py", line 12, in
from .gui import *
File "/Users/den/Library/Application Support/Anki2/addons21/1875288089/gui.py", line 15, in
from PyQt5.QtGui import QIcon, QFont
ModuleNotFoundError: No module named 'PyQt5'
When I Fetch new words from user wordlists but always fail, it shows as below, could you help me how to fix it? Thank you a lot. 👍
Fetching failed:
Traceback (most recent call last):
File "C:\Users\MATT\AppData\Roaming\Anki2\addons21\1875288089\gui.py", line 538, in run
self._fetch_wordlist()
File "C:\Users\MATT\AppData\Roaming\Anki2\addons21\1875288089\gui.py", line 568, in _fetch_wordlist
self.downloader.fetch_wordlist_entries(wordlist_id)
File "C:\Users\MATT\AppData\Roaming\Anki2\addons21\1875288089\Cambridge.py", line 323, in fetch_wordlist_entries
response = urlopen(self.req)
File "urllib.request", line 214, in urlopen
File "urllib.request", line 523, in open
File "urllib.request", line 632, in http_response
File "urllib.request", line 561, in error
File "urllib.request", line 494, in _call_chain
File "urllib.request", line 641, in http_error_default
urllib.error.HTTPError: HTTP Error 400: Bad Request
It is strange because in other decks I don't have it but with this one when I preview I see sound icons and a funny car picture:
https://i.imgur.com/sM2gfc6.png
https://i.imgur.com/HLuAwDQ.png
Is it somewhere in template? I can't see it?
Is it save to remove Picture field from note type?
Can you support bilingual Cambridge dictionary:
https://dictionary.cambridge.org/dictionary/english-polish/become
Click on three dots to choose language:
https://i.imgur.com/kDuGTRc.png
By the way, can you describe how to use it or create a video, please? I paste this sample link but nothing happens. How to get these cookies?
The add-on fails to import a word with a link from a specific dictionary.
For example, the import of word drop
from the Learner's dictionary via link https://dictionary.cambridge.org/dictionary/learner-english/drop, fails without showing a dialog.
I don't know how many videos I've already seen or post to figure out how to copy the cookie of my profile at Cambridge. Please, would you be available to write a guideline or at least a video. Thanks!
On the latest version, trying to install the plugin. Getting the following error when I click on Get New Notes from Link:
Debug info:
Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1
Platform: Mac 10.14
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-07-11 23:05:18
Add-ons possibly involved: Cambridge Dictionary
Error in sys.excepthook:
Traceback (most recent call last):
File "aqt/errors.py", line 19, in excepthook
File "aqt/errors.py", line 48, in write
UnicodeEncodeError: 'ascii' codec can't encode character '\u2013' in position 458: ordinal not in range(128)
Original exception was:
Traceback (most recent call last):
File "/Users/Jim/Library/Application Support/Anki2/addons21/1875288089/main.py", line 20, in ask_user_for_link
window = LinkDialogue()
File "/Users/Jim/Library/Application Support/Anki2/addons21/1875288089/gui.py", line 45, in __init__
self.initUI()
File "/Users/Jim/Library/Application Support/Anki2/addons21/1875288089/gui.py", line 50, in initUI
File "aqt/__init__.py", line 185, in fn__
UnicodeEncodeError: 'ascii' codec can't encode character '\u2013' in position 137: ordinal not in range(128)
Also, I wasn't sure which cookie value exactly to paste into the cookie field from cambridge plus's site. I have like 10 of them, so I tried the JSESSIONID value. Some examples would be helpful.
In the config file it reads:
{
"cookie": "54619xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-x1",
"wordlist_ids": [
"209xxxxx"
]
}
(I added x's as to not reveal the string)
Any help would be great, thanks.
Could you please upload some manual?
Fetching failed:
Traceback (most recent call last):
File "C:\Users\allen\AppData\Roaming\Anki2\addons21\1875288089\gui.py", line 538, in run
self._fetch_wordlist()
File "C:\Users\allen\AppData\Roaming\Anki2\addons21\1875288089\gui.py", line 568, in _fetch_wordlist
self.downloader.fetch_wordlist_entries(wordlist_id)
File "C:\Users\allen\AppData\Roaming\Anki2\addons21\1875288089\Cambridge.py", line 323, in fetch_wordlist_entries
response = urlopen(self.req)
File "urllib\request.py", line 222, in urlopen
File "urllib\request.py", line 525, in open
File "urllib\request.py", line 542, in _open
File "urllib\request.py", line 502, in _call_chain
File "urllib\request.py", line 1393, in https_open
File "urllib\request.py", line 1350, in do_open
File "http\client.py", line 1255, in request
File "http\client.py", line 1296, in _send_request
File "http\client.py", line 1228, in putheader
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 512: ordinal not in range(256)
The "Ok" and "Cancel" buttons are not visible when the word to import has a high number of definitions:
For example, with the word bound
: https://dictionary.cambridge.org/dictionary/english/bound
Please make it possible to use bilingual dictionaries:
https://i.imgur.com/TBofr6c.png
It creates new notes from link:
https://dictionary.cambridge.org/dictionary/english/become
but not from:
https://dictionary.cambridge.org/pl/dictionary/english-polish/become
Maybe out of scope for this add-on, but would be nice to import the verb's parts as separate cards.
For example, the verb throw has: throw (base form/infinitive), threw (past simple) and thrown (past participle).
The add-on can create:
a. a card with the three parts as answer.
b. a card for each part.
The user can configure which one to use.
Steps to reproduce:
What happens? Nothing.
What so you expect to happen?
confident
Note: Probably triggered by this issue, the title of the import dialog is not updated.
I would like to save only 1 pronunciation, not both UK and US. Please, make the add-on support choosing between pronunciations (e.g. with checkbox). Thanks!
I'm currently logged into Cambridge Dictionary with Google, set copied and pasted the cookie content, but fetching my wordlist does not work.
It says: "Fetching failed:
Authentification failed. Either your cookie expired or your are trying to delete entries from a community wordlist."
Debug info:
Anki 2.1.22 (0ecc189a) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1
Platform: Linux
Flags: frz=True ao=True sv=?
Add-ons, last update check: 2020-05-11 18:19:58
Add-ons possibly involved: Cambridge Dictionary
/home/username/.local/share/Anki2/addons21/1875288089/lib/selenium/webdriver/firefox/firefox_profile.py:208: SyntaxWarning: "is" with a literal. Did you mean "=="?
if setting is None or setting is '':
Add-ons possibly involved: Cambridge Dictionary
Caught exception:
Traceback (most recent call last):
File "/home/user/.local/share/Anki2/addons21/1875288089/gui.py", line 84, in get_word_definitions_from_link
downloader.get_word_defs()
File "/home/user/.local/share/Anki2/addons21/1875288089/Cambridge.py", line 85, in get_word_defs
response = urlopen(req)
File "urllib/request.py", line 222, in urlopen
File "urllib/request.py", line 525, in open
File "urllib/request.py", line 542, in _open
File "urllib/request.py", line 502, in _call_chain
File "urllib/request.py", line 1362, in https_open
File "urllib/request.py", line 1323, in do_open
File "http/client.py", line 1322, in getresponse
File "http/client.py", line 303, in begin
File "http/client.py", line 272, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
Version 2.1.22 (0ecc189a)
Python 3.8.1 Qt 5.14.1 PyQt 5.14.1
Operating System: Manjaro Linux
KDE Plasma Version: 5.19.3
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0
Kernel Version: 5.7.9-1-MANJARO
OS Type: 64-bit
I used this link
https://dictionary.cambridge.org/dictionary/english/appointment
By the way, I have a question: have you thought about an add-on that would make use of dictionary on DVD somehow drawing data from its original database files? That would prevent errors from Cambridge changing their website. Or alternatively from Oxford Advanced Learner's Dictionary on DVD 9th edition.
When importing a word, the add-on visualizes a series of definitions from different dictionaries, for example Cambridge American English Dictionary, Cambridge Advanced Learners Dictionary – Thesaurus and Cambridge Business English Dictionary.
Would be nice to limit the visualised list of definitions to a select list of dictionaries.
Would it be possible to add an option to select / deselect all definitions in add to the collection window?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.