eshapard / AnkiHabitica

Anki 2.0/2.1 add-on for use with HabitRPG. Automatically scores habits when you reach the end of your Anki timebox and when you review all cards in a deck.
GNU General Public License v3.0
197 stars 31 forks source link

Anki 23.12.1 error #146

Closed richard-hajek closed 7 months ago

richard-hajek commented 7 months ago

Heyo,

The addon still works, but seems to throw this occaisionally

Anki 23.12.1 (1a1d4d54) (src) (ao)
Python 3.11.8 Qt 6.6.3 PyQt 6.6.1
Platform: Linux-6.8.2-arch2-1-x86_64-with-glibc2.39

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/aqt/taskman.py", line 142, in _on_closures_pending
    closure()
  File "/usr/lib/python3.11/site-packages/aqt/taskman.py", line 86, in <lambda>
    lambda future: self.run_on_main(lambda: on_done(future))
                                            ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aqt/taskman.py", line 106, in wrapped_done
    on_done(fut)
  File "/usr/lib/python3.11/site-packages/aqt/sync.py", line 124, in on_future_done
    return on_done()
           ^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aqt/main.py", line 1060, in on_collection_sync_finished
    after_sync()
  File "/usr/lib/python3.11/site-packages/aqt/main.py", line 1068, in <lambda>
    self._sync_collection_and_media(lambda: after_sync(True))
                                            ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aqt/main.py", line 659, in after_sync
    self.media_syncer.show_diag_until_finished(after_media_sync)
  File "/usr/lib/python3.11/site-packages/aqt/mediasync.py", line 110, in show_diag_until_finished
    return on_finished()
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aqt/main.py", line 656, in after_media_sync
    onsuccess()
  File "/usr/lib/python3.11/site-packages/aqt/main.py", line 534, in callback
    self._unloadProfile()
  File "/usr/lib/python3.11/site-packages/aqt/main.py", line 551, in _unloadProfile
    self._reviewer_refresh_timer.deleteLater()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AnkiQt' object has no attribute '_reviewer_refresh_timer'

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Anki Habitica for 21 ['1758045507', 2023-12-16T13:33, 'None', '']

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

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])

( No doubt due to Anki Version 23 ))

71e6fd52 commented 7 months ago

I cannot reproduce this issue. When does this issue usually occur?

Additionally, from the Traceback, it seems to be an issue with Anki itself and not related to AnkiHabitica's code. Does this error occur if you disable AnkiHabitica?

richard-hajek commented 7 months ago

Hey, it stopped throwing. I don't know why. I'll let you know if I can bring more info. (AnkiHabitica is still installed)