-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
issueFacing some difficultiesFacing some difficulties
Description
Bug Description
The plugin crashes on the latest version of Anki (25.09.2) running on Arch Linux. The issue appears to be caused by stricter type enforcement in PyQt 6.10 / Python 3.14, where methods like setFixedHeight, setValue, and QPoint now require int arguments and no longer implicitly cast float.
System Information
- OS: Arch Linux (Linux-6.18.6-arch1-1-x86_64)
- Anki Version: 25.09.2 (3890e12c)
- Python: 3.14.2
- Qt / PyQt: 6.10.2
Tracebacks
I encountered three distinct crashes.
**Crash 1: options.py - setFixedHeight**
Traceback (most recent call last):
File ".../addons21/368380974/src/options.py", line 955, in update_text_size
text_box.setFixedHeight(min_height if doc_height <= min_height else doc_height + 5)
TypeError: setFixedHeight(self, h: int): argument 1 has unexpected type 'float'
**Crash 2: options.py - setValue**
Traceback (most recent call last):
File ".../addons21/368380974/src/options.py", line 1231, in load_add_to_queue
self.ui.queueRatioSlider.setValue(queue_input[QueueAction.SIMILAR_RATIO] * 100)
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'
**Crash 3: forms.py - QPoint**
Traceback (most recent call last):
File ".../addons21/368380974/res/ui/forms.py", line 155, in show_tip
global_pos = self.mapToGlobal(QPoint(x, y))
TypeError: QPoint(xpos: int, ypos: int): argument 1 has unexpected type 'float'
Proposed Fixes (Tested & Working)
I managed to fix the plugin locally by manually casting the float values to integers in the following files.
**1. Fixes in src/options.py**
Line 955:
# Before
text_box.setFixedHeight(min_height if doc_height <= min_height else doc_height + 5)
# After
text_box.setFixedHeight(int(min_height if doc_height <= min_height else doc_height + 5))Line 1231:
# Before
self.ui.queueRatioSlider.setValue(queue_input[QueueAction.SIMILAR_RATIO] * 100)
# After
self.ui.queueRatioSlider.setValue(int(queue_input[QueueAction.SIMILAR_RATIO] * 100))**2. Fix in res/ui/forms.py**
Line 155:
# Before
global_pos = self.mapToGlobal(QPoint(x, y))
# After
global_pos = self.mapToGlobal(QPoint(int(x), int(y)))Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
issueFacing some difficultiesFacing some difficulties