Arthur-Milchior / anki-copy-note

An add-on to copy anki's note
GNU General Public License v3.0
23 stars 9 forks source link

An error occurred. #3

Closed pschroeter closed 5 years ago

pschroeter commented 5 years ago

I think I've been getting this error when I select Copy Note from the menu since the recent update. At least I assume it was the update since I haven't used it a lot, but I know when I first downloaded and tried it out a while back it it was working then, but not recently when I wanted to try to use it again.

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 on the add-ons section of our support site. Debug info: Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3 Platform: Windows 10 Flags: frz=True ao=True sv=2

Caught exception: File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 60, in a.triggered.connect(lambda : copyNotes(browser.selectedNotes())) File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 49, in copyNotes copyNote(nid) File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 68, in copyNote for card in cards: copyCard(card, note) File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 84, in copyCard for data in mw.col.db.all("select * from revlog"): copyData(data) File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 89, in copyData cid = card.id <class 'NameError'>: name 'card' is not defined

Arthur-Milchior commented 5 years ago

Strange, I wonder how I missed it. Thanks for the report; it's corrected.

pschroeter commented 5 years ago

Thank you for being so quick, but I'm still having problems. After I updated I got the following. It looks very similar to the first, but is different.

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 on the add-ons section of our support site. Debug info: Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3 Platform: Windows 10 Flags: frz=True ao=True sv=2

Caught exception: File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 60, in a.triggered.connect(lambda : copyNotes(browser.selectedNotes())) File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 49, in copyNotes copyNote(nid) File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 68, in copyNote for card in cards: copyCard(card, note) File "C:\Users\Paul Schroeter\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 85, in copyCard copyLog(data, newCid) <class 'NameError'>: name 'newCid' is not defined

Arthur-Milchior commented 5 years ago

Please update again

Arthur-Milchior commented 5 years ago

Did it disappear ?

pschroeter commented 5 years ago

I apologize for not getting back to you, but no it didn’t. It seems like the error report gets shorter. But I have to be honest, I then started getting another separate error where the Anki itself would stop working and asked me to rebuild the database. When that happened I just gave up on Copy Note and deleted it and thankfully rebuilding the database made the Anki error go away.

I’m disappointed because years ago when Anki first got clozes I went crazy with it and created notes with five or six clozes I was hoping to break up into smaller notes.

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 on the add ons section of our support site. Debug info: Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3 Platform: Windows 10 Flags: frz=True ao=True sv=2

Caught exception: File "aqt\webview.py", line 322, in handler File "aqt\reviewer.py", line 281, in _onAnswerButton File "aqt\reviewer.py", line 240, in _answerCard File "aqt\reviewer.py", line 96, in nextCard File "aqt\reviewer.py", line 164, in _showQuestion File "anki\cards.py", line 174, in isEmpty File "anki\cards.py", line 146, in model File "anki\cards.py", line 142, in note File "anki\collection.py", line 262, in getNote File "anki\notes.py", line 15, in init File "anki\notes.py", line 38, in load <class 'TypeError'>: 'NoneType' object is not iterable

Error An error occurred. Please use Tools > Check Database to see if that fixes the problem. If problems persist, please report the problem on our support site. Please copy and paste the information below into your report. Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3 Platform: Windows 10 Flags: frz=True ao=False sv=2

Caught exception: File "aqt\webview.py", line 322, in handler File "aqt\reviewer.py", line 281, in _onAnswerButton File "aqt\reviewer.py", line 240, in _answerCard File "aqt\reviewer.py", line 96, in nextCard File "aqt\reviewer.py", line 164, in _showQuestion File "anki\cards.py", line 174, in isEmpty File "anki\cards.py", line 146, in model File "anki\cards.py", line 142, in note File "anki\collection.py", line 262, in getNote File "anki\notes.py", line 15, in init File "anki\notes.py", line 38, in load <class 'TypeError'>: 'NoneType' object is not iterable

Arthur-Milchior commented 5 years ago

When do you get this error message ? When you ask the browser to copy a note ? Because right now, it seems related to reviewing card, and I can't imagine how it can be related to the «add-on copy note»

pschroeter commented 5 years ago

I believe I was getting the first error whenever I ran Copy Note. It resembles the previous errors I had been getting. As to the second database error, I wrote about it in my diary.

"I was reviewing notes in Anki when it started throwing Errors at me and asking me to restart with my addons disabled. I’ve been having problems getting an addon named “Copy Note” to work and I’m not ready to panic yet. My first attempt to troubleshoot was hold down the Shift key to restart with addons disabled. This worked for a while, but eventually I got a different error that told me to rebuild my database. I restarted and rebuilding the database found six errors. This sounded suspiciously like a problem “Copy Note” which duplicates notes and their histories might cause so I deleted it."

All I know is I haven't had any problems since.

Arthur-Milchior commented 5 years ago

Did you copy the description of the 6 errors by any luck ? It could be quite instructive

Le jeu. 26 sept. 2019 à 18:09, pschroeter notifications@github.com a écrit :

I believe I was getting the first error whenever I ran Copy Note. It resembles the previous errors I had been getting. As to the second database error, I wrote about it in my diary.

"I was reviewing notes in Anki when it started throwing Errors at me and asking me to restart with my addons disabled. I’ve been having problems getting an addon named “Copy Note” to work and I’m not ready to panic yet. My first attempt to troubleshoot was hold down the Shift key to restart with addons disabled. This worked for a while, but eventually I got a different error that told me to rebuild my database. I restarted and rebuilding the database found six errors. This sounded suspiciously like a problem “Copy Note” which duplicates notes and their histories might cause so I deleted it."

All I know is I haven't had any problems since.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Arthur-Milchior/anki-copy-note/issues/3?email_source=notifications&email_token=AACXH4NBUV2XM7JFBQ56E23QLTNFBA5CNFSM4IWV2HV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7WDZ4Y#issuecomment-535575795, or mute the thread https://github.com/notifications/unsubscribe-auth/AACXH4PP7NRIBKH662KTK4DQLTNFBANCNFSM4IWV2HVQ .

pschroeter commented 5 years ago

Sorry, I only have what I sent your six days ago.

Arthur-Milchior commented 5 years ago

Well, you already sent me what I wanted. Sorry, I didn't have the context when I answered by email. I shouldn't have asked this question.

Arthur-Milchior commented 5 years ago

I've read again the full history of this discussion. I fear that I have no way anymore to help you if you did uninstall the add-on. If my add-on really caused the problem then I guess that you won't have those errors anymore. I wish you good luck with your future with anki without this addon.

What's surprising is that you're the only one telling me that you have this problem. And this add-on has been downloaded thousands of time, so i assume hundreds of people use it; you shouldn't be the only one to report this trouble.