AnKing-VIP / AnkiRecolor

Recolor addon commissioned by and created for AnKing
39 stars 8 forks source link

Recolor 04/24/2023 update error on 2.1.54 (b6a7760c)⁩ #29

Closed Euroga closed 1 year ago

Euroga commented 1 year ago

Problem description

Please describe the issue concisely in here. In case of an error: Walk us through the steps you took to get there. What happened? What did you expect to happen?

Checklist

Please replace the space inside the brackets with an x if the following items apply:

What Anki version are you using?

*Please open Anki, go to Help → About (windows) or Anki → About Anki (mac) to find the version. Edit the value between the backticks below

Version ⁨2.1.54 (b6a7760c)⁩
Python 3.9.7 Qt 5.15.2 PyQt 5.15.5

Error message (if any)

If you've received an error message, please copy and paste it between the backticks below:

When loading '⁨ReColor⁩':
⁨Traceback (most recent call last):
  File "aqt.addons", line 244, in loadAddons
  File "C:\Users\justi\AppData\Roaming\Anki2\addons21\688199788\__init__.py", line 7, in <module>
    from . import colors
  File "C:\Users\justi\AppData\Roaming\Anki2\addons21\688199788\colors.py", line 205, in <module>
    recolor_python()
  File "C:\Users\justi\AppData\Roaming\Anki2\addons21\688199788\colors.py", line 22, in recolor_python
    replace_color(color_entries, color_name)
  File "C:\Users\justi\AppData\Roaming\Anki2\addons21\688199788\colors.py", line 41, in replace_color
    anki_color["light"] = color_entry[1]
TypeError: 'tuple' object does not support item assignment
antilgbtq commented 1 year ago

same error

wrinkledeth commented 1 year ago

I have the same error on MacOS Anki 2.1.54: https://github.com/AnKing-Memberships/AnkiRecolor/issues/28

mimoimo commented 1 year ago

I also have the same error :/

sd0e commented 1 year ago

Same issue on Anki 2.1.54, Windows 11. Fixed by upgrading to 2.1.61.

wrinkledeth commented 1 year ago

Unfortunately I cant upgrade to 2.1.61 as it would cause conflicts in my other addons. Is there a workaround for us 2.1.54 users?

moagnew commented 1 year ago

Same issue on Anki 2.1.54, Windows 11. Fixed by upgrading to 2.1.61.

Yes I had the same problem and update helped on mac

Euroga commented 1 year ago

Same issue on Anki 2.1.54, Windows 11. Fixed by upgrading to 2.1.61.

Good solution. I wasn't aware of vs 2.1.61 until your comment. Thanks. Everything works smoothly now.

DavidRambo commented 1 year ago

I was seeing the same error on Linux until updating to the Qt6 2.1.61 version. Looking at the code, it would seem to be an issue with aqt ("anki qt", I presume?), which is where the anki_color reference comes from in src/addons/colors.py ln.39.

abdnh commented 1 year ago

@AnKingMed looks like the 2.1.41-2.1.54 branch was accidentally updated with an incompatible version.

AnKingMed commented 1 year ago

Thanks @abdnh. I re-shared v2.2 of this as it looks like that was prior to the update. Do we need to make a new branch on here for the older versions or can we make one version compatible with all?

AnKingMed commented 1 year ago

@abdnh I actually did v2.2 and it didn't work so I just grabbed a version of recolor in my personal addons folder for 2.1.49 that I had saved. I don't actually know which one here is best. Can we organize it into a new branch or just make the current one compatible with all?

abdnh commented 1 year ago

Better to make one version compatible with all if possible I think. Will look into that.

abdnh commented 1 year ago

Looks like the add-on was practically rewritten for 55+ so supporting older versions in the same branch will probably complicate the code a lot. I went ahead and made a separate GitHub branch for older versions from the code before @BlueGreenMagick's work: https://github.com/AnKing-Memberships/AnkiRecolor/tree/54

AnKingMed commented 1 year ago

Thanks for doing that! @BlueGreenMagick said he may be able to work on stuff in the future too for this addon. Not totally sure though