Closed PiotrSss closed 7 years ago
Thanks for testing. I was able to reproduce this when trying to import a webpage. I assume that's what you were doing when you got that error?
I've updated the add-on on GitHub (direct link), which should solve the problem for now.
That said, something different breaks almost every time Damien releases a new beta. Just let me know if you run into anything else. At the moment I'm working to make the add-on compatible with Beta 16, but for now it only works with 13, 14 and 15.
No, it was on Anki (beta 15, OS X) startup after adding 'ir' folder to addons. But it's working now after your last commit :) Adding things manually works fine, but:
Caught exception:
File "/Users/piotr/Library/Application Support/Anki2/addons21/ir/importer.py", line 45, in importWebpage
webpage = self._fetchWebpage(url)
File "/Users/piotr/Library/Application Support/Anki2/addons21/ir/importer.py", line 23, in _fetchWebpage
html = urlopen(url).read().decode('utf-8')
File "urllib/request.py", line 223, in urlopen
File "urllib/request.py", line 526, in open
File "urllib/request.py", line 544, in _open
File "urllib/request.py", line 504, in _call_chain
File "urllib/request.py", line 1361, in https_open
File "urllib/request.py", line 1320, in do_open
<class 'urllib.error.URLError'>: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>
Caught exception:
File "/Users/piotr/Library/Application Support/Anki2/addons21/ir/importer.py", line 47, in importWebpage
self._createNote(webpage.title.string, body, url)
File "/Users/piotr/Library/Application Support/Anki2/addons21/ir/importer.py", line 33, in _createNote
did = mw.col.decks.byName(self.settings['importDeck'])['id']
<class 'TypeError'>: 'NoneType' object is not subscriptable
The first error is a Mac-only thing. As a work-around, I've disabled certificate checks on Mac.
I can't reproduce the second error, but I've changed the behaviour so that webpages are imported into whatever is the current deck.
Please try the updated add-on (here) and let me know how it goes.
It's working, thank you :)
Not a problem.
Hi, I'm testing Anki 2.1 and I saw your extension, I wanted to try it, but I'm getting this error on Anki startup:
Caught exception: File "aqt/progress.py", line 65, in handler File "aqt/main.py", line 115, in setupProfile File "aqt/main.py", line 254, in loadProfile File "anki/hooks.py", line 28, in runHook File "/Users/piotr/Library/Application Support/Anki2/addons21/ir/main.py", line 39, in onProfileLoaded self.importer = Importer(mw.settingsManager.settings) File "/Users/piotr/Library/Application Support/Anki2/addons21/ir/importer.py", line 17, in __init__ self.did = mw.col.decks.byName(settings['importDeck'])['id'] <class 'TypeError'>: 'NoneType' object is not subscriptable
Doesn't matter if I install this by pasting code from Anki addons website or by copying 'ir' from github master.