Beautify-Anki icon indicating copy to clipboard operation
Beautify-Anki copied to clipboard

ValueError: list.remove(x): x not in list (deckbrowser.css)

Open Munzu opened this issue 4 years ago • 4 comments

Before posting, please verify that you've done the following

  • [x] read the "before you install instructions" and disabled all the known conflicted add-ons.
  • [x] You've looked through previous issues to see if someone else had the same problem.

Describe the bug This bug has been reported before (#54) but it has been closed and wasn't properly formatted so I hope it's okay if I do it again.

When starting Anki, I get the following error. I tried disabling all my other add-ons but the issue persists.

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.43 (0fbae6bc) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-05-07 01:38:02

Traceback (most recent call last):
  File "aqt\main.py", line 510, in loadCollection
  File "aqt\main.py", line 653, in moveToState
  File "aqt\main.py", line 660, in _deckBrowserState
  File "aqt\deckbrowser.py", line 67, in show
  File "aqt\deckbrowser.py", line 127, in _renderPage
  File "aqt\deckbrowser.py", line 137, in __renderPage
  File "aqt\webview.py", line 457, in stdHtml
  File "aqt\hooks_gen.py", line 3238, in __call__
  File "C:\Users\Tai\AppData\Roaming\Anki2\addons21\BeautifyAnki\__init__.py", line 80, in on_webview_will_set_content
    web_content.css.remove("deckbrowser.css")
ValueError: list.remove(x): x not in list

I took a quick glance at the file but couldn't figure out the error.

By the way, while looking through the file, I also noticed that NIGHT_MODE was spelled incorrectly https://github.com/ShoroukAziz/Beautify-Anki/blob/master/init.py#L87

Screenshots If applicable, add screenshots to help explain your problem.

image

Context (please complete the following information):

  • OS: Windows 10
  • Anki Version: 2.1.43 (0fbae6bc)⁩
  • screen resolution 1920x1080

Additional context

This happened to me in Anki version 2.1.35 as well.

In your Anki go to help > About > Copy Debug Log and paste it between the following backticks

    Anki 2.1.43 (0fbae6bc) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
    Platform: Windows 10
    Flags: frz=True ao=True sv=2
    Add-ons, last update check: 2021-05-07 01:38:02
    
    
    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    '' ['BeautifyAnki', 0, 'None', mod]
    Review Heatmap ['review_heatmap', 2020-04-30T15:23, 'None', '']
    
    ===IDs of active AnkiWeb add-ons===
    
    
    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    '' ['BeautifyAnki_old', 0, 'None', mod]
    Advanced Browser ['874215009', 2021-02-21T15:38, 'None', '']
    Advanced Review Bottom Bar ['1136455830', 2020-12-05T19:27, 'None', mod]
    Browser TableEditor side-by-side horizontal split ['831846358', 2020-07-08T01:44, 'None', '']
    Custom Background Image and Gear Icon ['1210908941', 2021-04-02T18:21, 'None', mod]
    Customize Keyboard Shortcuts ['24411424', 2021-02-18T02:36, 'None', mod]
    Fastbar- with nightmode support ['46611790', 2021-02-11T18:31, 'None', '']
    Japanese Pitch Accent ['148002038', 2021-01-26T20:47, 'None', '']
    Mini Format Pack ['295889520', 2018-07-24T19:45, 'None', '']
    More Decks Stats and Time Left ['1556734708', 2021-01-27T10:09, 'None', mod]
    More Overview Stats 21 ['738807903', 2021-02-05T18:35, 'None', mod]
    Pokemanki ['633922407', 2021-02-24T19:49, 'None', '']
    Symbols As You Type ['2040501954', 2021-03-22T03:17, 'None', '']
    The KING of Button Add-ons ['374005964', 2020-04-18T00:33, 'None', mod]
    Web Browser - Search terms Import texts and images automatically ['864545277', 2020-08-29T20:23, 'None', mod]
    extended editor for field for tables searchreplace  ['805891399', 2020-11-24T01:08, 'None', '']

Munzu avatar May 07 '21 10:05 Munzu

I'm getting the same problem, even if I disable all my add-ons and just leave Beautify Anki on the message still pops up image

2yAu avatar May 10 '21 23:05 2yAu

Same situation.

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.44 (b2b3275f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-06-11 15:38:05

Traceback (most recent call last): File "aqt\main.py", line 510, in loadCollection File "aqt\main.py", line 653, in moveToState File "aqt\main.py", line 660, in _deckBrowserState File "aqt\deckbrowser.py", line 67, in show File "aqt\deckbrowser.py", line 127, in _renderPage File "aqt\deckbrowser.py", line 137, in _renderPage File "aqt\webview.py", line 457, in stdHtml File "aqt\hooks_gen.py", line 3238, in call File "C:\Users\User\AppData\Roaming\Anki2\addons21\BeautifyAnki_init.py", line 80, in on_webview_will_set_content web_content.css.remove("deckbrowser.css") ValueError: list.remove(x): x not in list

spacecoder7 avatar Jun 12 '21 05:06 spacecoder7

Same problem here, looks like .44 introduced a breaking change :-(

WaseemAlkurdi avatar Jul 09 '21 00:07 WaseemAlkurdi

same problem here

darkmarcos avatar Jul 14 '21 03:07 darkmarcos