jac241 / anki_killstreaks

A Halo and Call of Duty inspired add-on to gamify Anki and make reviewing more bearable
GNU Affero General Public License v3.0
17 stars 8 forks source link

[Anki 23.10 Beta 1] anki21 = version.startswith("2.1.") #50

Open khonkhortisan opened 1 year ago

khonkhortisan commented 1 year ago

you're currently only checking if Anki is older than 2.1 to run old functions, so this works for version = "23.10"

from anki.utils import point_version
#anki21 = version.startswith("2.1.")
#anki21 = version.startswith("2.1.") or int(version.split(".")[0]) >= 23
anki21 = version.startswith("2.1.") or point_version() >= 231000
Error
Un complemento que has instalado ha fallado al cargarse. Si los problemas persisten, por favor ve a Herramientas> Menú de complementos o deshabilita este complemento.

Mientras cargando '⁨Anki Killstreaks⁩':
⁨Traceback (most recent call last):
  File "aqt.addons", line 239, in loadAddons
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\__init__.py", line 15, in <module>
    from . import main
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\main.py", line 33, in <module>
    from . import chase_mode
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\chase_mode.py", line 14, in <module>
    from . import accounts, tooltips
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\accounts.py", line 6, in <module>
    from .networking import sra_base_url, shared_headers
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\networking.py", line 15, in <module>
    from . import accounts, tooltips
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\tooltips.py", line 10, in <module>
    from .config import local_conf
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\config.py", line 20, in <module>
    from .consts import *
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\579111794\consts.py", line 26, in <module>
    addon_path = os.path.dirname(__file__).decode(sys_encoding)
AttributeError: 'str' object has no attribute 'decode'

Versión ⁨23.10 (1f6938d7)⁩ Python 3.9.15 Qt 6.5.2 PyQt 6.5.2