iamjustkoi / StudyTimeStats

Customizable statistics add-on for Anki.
https://ankiweb.net/shared/info/1247171202
MIT License
21 stars 4 forks source link

Add-On Not Working on Startup (Qt5) #47

Closed jerryjs2 closed 10 months ago

jerryjs2 commented 10 months ago

Bug/Issue Description When I start Anki, the add-on fails on startup. This started on the evening of 1/28 CST

To Reproduce Steps to reproduce:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots/Visuals

Screenshot 2024-01-30 at 4 48 20 AM

System/Debug Info Anki 23.12.1 (1a1d4d54) (ao) Python 3.9.15 Qt 5.14.2 PyQt 5.14.1 Platform: macOS-13.2.1-x86_64-i386-64bit

When loading Study Time Stats: Traceback (most recent call last): File "aqt.addons", line 245, in loadAddons File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/init.py", line 8, in from .src import toolbar File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/src/toolbar.py", line 12, in from .options import TimeStatsOptionsDialog File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/src/options.py", line 53, in from ..res.ui.Qt5.cell_item import Ui_CellWidget File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/res/ui/Qt5/cell_item.py", line 11, in from PyQt6 import QtCore, QtGui, QtWidgets ModuleNotFoundError: No module named 'PyQt6'

Additional Context Any other context that might seem important.

iamjustkoi commented 10 months ago

Aw, shoot, figured I could have the two versions intermingle but might be a simple fix I can push out real quick.

Thanks for the report!

iamjustkoi commented 10 months ago

Fixed in the most recent patch (v2.1.1), thanks again!

jerryjs2 commented 10 months ago

Hi, unfortunately the issue is still persisting, and the add-on fails on startup even after updating. Here's the debug info.

Anki 23.12.1 (1a1d4d54) (ao) Python 3.9.15 Qt 5.14.2 PyQt 5.14.1 Platform: macOS-13.2.1-x86_64-i386-64bit

When loading Study Time Stats: Traceback (most recent call last): File "aqt.addons", line 245, in loadAddons File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/init.py", line 8, in from .src import toolbar File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/src/toolbar.py", line 12, in from .options import TimeStatsOptionsDialog File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/src/options.py", line 53, in from ..res.ui.Qt5.cell_item import Ui_CellWidget File "/Users/jerry/Library/Application Support/Anki2/addons21/1247171202/res/ui/Qt5/cell_item.py", line 554, in from .forms import DragHandle, HoverButton, RotateButton ModuleNotFoundError: No module named '1247171202.res.ui.Qt5.forms'

iamjustkoi commented 10 months ago

Ohh, shoot, this should work in the Qt6 versions, and I don't think the fix should be too difficult to do, but I might not be able to get to it until the weekend. Thanks so much for reporting it in, again, though! Will try to fix this as soon as I can.

iamjustkoi commented 10 months ago

Should be good to go now (v2.1.2)! Sorry about the extra issues and appreciate the follow up, again!