glutanimate / review-heatmap

Anki add-on to help you keep track of your review activity
https://ankiweb.net/shared/info/1771074083
Other
1.21k stars 91 forks source link

No image on Anki 2.1.52 Qt6 #160

Closed PavelAmialiushka closed 2 years ago

PavelAmialiushka commented 2 years ago

Problem description

a) Image disapeared after update of Anki to 2.1.52 Qt6

image b) Config dialog is unavailable image

Checklist

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

Information about your Anki set-up

Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):


    Anki 2.1.52 (ab1c2395) Python 3.9.7 Qt 6.3.0 PyQt 6.3.0
    Platform: Windows 10
    Flags: frz=True ao=False sv=3
    Add-ons, last update check: 2022-05-24 08:27:40

    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    Review Heatmap ['review_heatmap', 2020-04-30T16:23, 'None', '']

    ===IDs of active AnkiWeb add-ons===

    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    Anki Simulator ['817108664', 2021-08-07T22:24, 'None', '']
    AwesomeTTS - Add speech to your flashcards ['1436550454', 2022-05-21T03:28, 'None', '']
    Fastbar- with nightmode support ['46611790', 2022-04-15T06:04, 'None', '']
    Korean Support ['1336389630', 2021-07-31T23:19, 'None', mod]

Error message (if any)

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

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.52 (ab1c2395) Python 3.9.7 Qt 6.3.0 PyQt 6.3.0
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-05-24 08:27:40

Caught exception:
Traceback (most recent call last):
  File "aqt.addons", line 960, in onConfig
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\gui\options.py", line 209, in invokeOptionsDialog
    dialog = RevHmOptions(config, mw, parent=parent)
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\gui\options.py", line 107, in __init__
    super(RevHmOptions, self).__init__(
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\libaddon\gui\dialog_options.py", line 81, in __init__
    super(OptionsDialog, self).__init__(
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\libaddon\gui\basic\dialog_mapped.py", line 154, in __init__
    self.setData(data)
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\libaddon\gui\basic\dialog_mapped.py", line 162, in setData
    self.interface.set(widget_name, key, value)
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\libaddon\gui\basic\interface.py", line 270, in set
    return setter(widget, data)
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\libaddon\gui\basic\interface.py", line 354, in setValue
    self._setDateTime(widget, data)
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\libaddon\gui\basic\interface.py", line 800, in _setDateTime
    return qdatetimeedit.setDateTime(self._createDateTimeFromUnix(curtime))
  File "C:\Users\Admin\AppData\Roaming\Anki2\addons21\review_heatmap\libaddon\gui\basic\interface.py", line 793, in _createDateTimeFromUnix
    qdatetime.setTime_t(unixtime)
AttributeError: 'QDateTime' object has no attribute 'setTime_t'
glutanimate commented 2 years ago

Hi Pavel, thanks for the report! It looks like you're using an old version of the add-on. Updating to the latest one from AnkiWeb will make the add-on work with Qt6. (You no longer need to install the .ankiaddon file manually. You can just copy/paste the add-on code into Anki like with any other add-on).

Hope that helps!

PavelAmialiushka commented 2 years ago

Thanks for your reply.

You are right. That helped