jefdongus / insert-symbols-anki-addon

Anki add-on to insert Unicode symbols into cards.
https://ankiweb.net/shared/info/2040501954
24 stars 10 forks source link

Issue with External Note Editor for the Browser and open windows multiple times #9

Open silentcicada1 opened 4 years ago

silentcicada1 commented 4 years ago

This error occurs whenever multiple windows have been open:

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-on support site. Debug info: Anki 2.1.23 (de9543ff) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1 Platform: Mac 10.15.1 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-04-03 22:16:45 Add-ons possibly involved: ⁨Symbols As You Type⁩

Caught exception: Traceback (most recent call last): File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 36, in on_text_edited self._check_for_replacement(current_text, False) File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 56, in _check_for_replacement cursor_pos = self.get_search_box().cursorPosition() File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 26, in get_search_box return self._browser.form.searchEdit.lineEdit() RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

Caught exception: Traceback (most recent call last): File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 36, in on_text_edited self._check_for_replacement(current_text, False) File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 56, in _check_for_replacement cursor_pos = self.get_search_box().cursorPosition() File "/Users/papasmurf/Library/Application Support/Anki2/addons21/2040501954/browser_replacer.py", line 26, in get_search_box return self._browser.form.searchEdit.lineEdit() RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

qriousguy commented 4 years ago

I've a similar issue with open windows multiple times. Here's the error report:

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-on support site. Debug info: Anki 2.1.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-04-07 09:31:20

Caught exception: Traceback (most recent call last): File "C:\Users\Arnav Kalra\AppData\Roaming\Anki2\addons21\2040501954\browser_replacer.py", line 36, in on_text_edited self._check_for_replacement(current_text, False) File "C:\Users\Arnav Kalra\AppData\Roaming\Anki2\addons21\2040501954\browser_replacer.py", line 56, in _check_for_replacement cursor_pos = self.get_search_box().cursorPosition() File "C:\Users\Arnav Kalra\AppData\Roaming\Anki2\addons21\2040501954\browser_replacer.py", line 26, in get_search_box return self._browser.form.searchEdit.lineEdit() RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

jefdongus commented 4 years ago

Hm, are there any steps you can take to reproduce this error? I am still having trouble reproducing this on my end :(

@qriousguy was this with the"External Note Editor" addon installed as well?

silentcicada1 commented 4 years ago

I had two different browsers opened and every time I went to type in the search box I had the above error until I restarted anki.

qriousguy commented 4 years ago

No, I've not installed the external note editor addon. Steps to reproduce this error:

  1. Open a browse window
  2. Wait for a few minutes
  3. Type anything in the search box of that window - you'll notice this error when you try to type. Closing browse windows and opening a new one, resolves the issue. The new window doesn't show any errors at first, starts giving the same error message after a few minutes. This error message occurs even when no other actions have been taken (like adding a card etc)

On Tue, 14 Apr, 2020, 2:45 am jefdongus, notifications@github.com wrote:

Hm, are there any steps you can take to reproduce this error? I am still having trouble reproducing this on my end :(

@qriousguy https://github.com/qriousguy was this with the"External Note Editor" addon installed as well?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jefdongus/insert-symbols-anki-addon/issues/9#issuecomment-613101789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGA24U5C7B6QLLQSQFJL64LRMN6HVANCNFSM4L7HNV3Q .

jefdongus commented 4 years ago

Hm, can you list all the add-ons you have installed? I tried the steps you listed above, but even after several hours there was no error.

The difference in behavior on my end and on your end makes me think that perhaps this is either due to another add-on or a difference in our computers (perhaps amount of memory or something? ...not sure what Qt does behind-the-scenes with UI components).

In the meantime, can you replace browser_replacer.py with this debug version? Link: https://gist.githubusercontent.com/jefdongus/7013e508f655dfe89742d64e8feb51ce/raw/21176327aa83a69ba5e91982234de52e200fed74/browser_replacer.py

Steps as follows:

  1. Open the Add-ons window (Tools -> Add-ons), select Symbols As You Type, and click "View Files" to open the add-on source code directory.
  2. Create a backup of browser_replacer.py (eg. rename it to browser_replacer.py.bak).
  3. Click on the above link and save the file to the directory (make sure it is named browser_replacer.py).
  4. Run Anki and try to replicate this error again. Instead of crashing, it should create a popup with some debug info. Could you copy and paste that debug info below? Thanks!
qriousguy commented 4 years ago

Hi, The debug info seems to suggest a problem with the advanced browser addon.

<874215009.advancedbrowser.core.AdvancedBrowser object at 0x00000197CC1C1C10>

I'm unable to replicate the error after disabling advanced browser. Here's my list of addons: 1. Add Table 2. Advanced Browser 3. Blitzkrieg Il - Advanced Browser Sidebar 8ETA7 4. Bury related notes 5. Clickable Tags VI I 6. Copy notes 7. Frozen Fields 8. Image Occlusion Enhanced for Anki 21 alpha 9. Mini Format Pack 10. Opening the same window multiple time 11. Review Heatmap 12. Subtag Completer 13. Symbols As You Type 14. Special Fields (disabled) I think I'll remove the advanced browser addon. Thanks for the help. Regards, Arnav Kalra On Wed, Apr 15, 2020 at 8:55 PM jefdongus wrote: > Hm, can you list all the add-ons you have installed? I tried the steps you > listed above, but even after several hours there was no error. > > The difference in behavior on my end and on your end makes me think that > perhaps this is either due to another add-on or a difference in our > computers (perhaps amount of memory or something? ...not sure what Qt does > behind-the-scenes with UI components). > > In the meantime, can you replace browser_replacer.py with this debug > version? Link: > https://gist.githubusercontent.com/jefdongus/7013e508f655dfe89742d64e8feb51ce/raw/21176327aa83a69ba5e91982234de52e200fed74/browser_replacer.py > > Steps as follows: > > 1. Open the Add-ons window (Tools -> Add-ons), select Symbols As You > Type, and click "View Files" to open the add-on source code directory. > 2. Create a backup of browser_replacer.py (eg. rename it to > browser_replacer.py.bak). > 3. Click on the above link and save the file to the directory (make > sure it is named browser_replacer.py). > 4. Run Anki and try to replicate this error again. Instead of > crashing, it *should* create a popup with some debug info. Could you > copy and paste that debug info below? Thanks! > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . >
jefdongus commented 4 years ago

Hmm, which version of Advanced Browser are you on? I'm having no problems with Anki 2.1.22 and Advanced Browser version 2.7 (to see the version, select Advanced Browser from the Add-ons popup, click View Files, and then open __init__.py to see the version).

qriousguy commented 4 years ago

I'm on Anki 2.1.22, advanced browser v 2.7. Maybe there's some other issue.

On Thu, Apr 16, 2020 at 7:00 PM jefdongus notifications@github.com wrote:

Hmm, which version of Advanced Browser are you on? I'm having no problems with Anki 2.1.22 and Advanced Browser version 2.7 (to see the version, select Advanced Browser from the Add-ons popup, click View Files, and then open init.py to see the version).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jefdongus/insert-symbols-anki-addon/issues/9#issuecomment-614654021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGA24U57XAJEOJEMF4CEGG3RM4CATANCNFSM4L7HNV3Q .

qriousguy commented 4 years ago

I'd uninstalled advanced browser earlier. I'm not noticing this issue after reinstalling it. I'll let you know in case of any updates.

Arthur-Milchior commented 4 years ago

Similar error

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, repeat 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.24 (359b9f5c) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1 Platform: Linux Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-05-08 11:01:50 Add-ons possibly involved: ⁨Symbols As You Type⁩

Caught exception: RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

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

Traceback (most recent call last): File "/home/arthur/.local/share/Anki2/addons21/2040501954/browser_replacer.py", line 40, in on_return_pressed search_box = self.get_search_box() SystemError: PyEval_EvalFrameEx returned a result with an error set

I am on latest anki. 2.1.25, I do have multi window opener (I actually created it, so I may be able to help with it eventually) and advanced browser (I contributed to it and know its source code, so it may help) I don't have time immediately, just wanted to report the problem

qriousguy commented 4 years ago

I've also experienced this error again on anki 2.1.25. Only once though.

On Fri, 8 May, 2020, 5:51 pm Arthur Milchior, notifications@github.com wrote:

Similar error

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, repeat 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.24 (359b9f5c) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1 Platform: Linux Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-05-08 11:01:50 Add-ons possibly involved: ⁨Symbols As You Type⁩

Caught exception: RuntimeError: wrapped C/C++ object of type QComboBox has been deleted

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

Traceback (most recent call last): File "/home/arthur/.local/share/Anki2/addons21/2040501954/browser_replacer.py", line 40, in on_return_pressed search_box = self.get_search_box() SystemError: PyEval_EvalFrameEx returned a result with an error set

I am on latest anki. 2.1.25, I do have multi window opener (I actually created it, so I may be able to help with it eventually) and advanced browser (I contributed to it and know its source code, so it may help) I don't have time immediately, just wanted to report the problem

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jefdongus/insert-symbols-anki-addon/issues/9#issuecomment-625789347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGA24U544SWSJLIEY6N2VJDRQP2NVANCNFSM4L7HNV3Q .

thiswillbeyourgithub commented 4 years ago

Same here. Closing and reoppening the browser window fixes it. At least until I open several browser and use them for a bit (does not seem to occur instantly, oddly enough)

aPaci95 commented 3 years ago

Same here. Closing and reoppening the browser window fixes it. At least until I open several browser and use them for a bit (does not seem to occur instantly, oddly enough)

same problem here

aPaci95 commented 3 years ago

Is there any update? Unfortunately, this problem really interrupts the workflow...

aPaci95 commented 3 years ago

Somehow, installing old versions of these addons from a backup i had stored in cloud, the error didn't occur again, while it works perfectly. I really can't explain what happened, but if someone encountered the same error i can send my addon files to you to see if it fixes it.