Describe the bug
The Qt5 compatibility code is now off by default, which may break some add-ons that haven't been updated to support Qt6 in the last 2 years. If you find any have broken, please report the issues to the add-on author, and start Anki after setting the env var ENABLE_QT5_COMPAT to 1 to temporarily restore the compatibility code.
To Reproduce
Steps to reproduce the behavior:
. Go to '...'
. Click on '....'
. Scroll down to '....'
. See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Specs (please complete the following information):
- OS: Windows 10
Anki Version 23.10 beta 6 (72e57456) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
- Incremental Reading v4118 unofficial clone
Additional context
Add any other context about the problem here.
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 'Incremental Reading v4118 unofficial clone':
Traceback (most recent call last):
File "aqt.addons", line 239, in loadAddons
File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\__init__.py", line 17, in <module>
from .main import ReadingManager
File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\999215520\main.py", line 26, in <module>
import sip
ModuleNotFoundError: No module named 'sip'
main.py
try:
from PyQt6 import sip
except ImportError:
import sip
about.py
#from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout
try:
from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout
except ImportError:
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLabel, QVBoxLayout
gui.py
try:
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QFont
from PyQt6.QtWidgets import (
QButtonGroup,
QCheckBox,
QComboBox,
QDialog,
QDialogButtonBox,
QGroupBox,
QHBoxLayout,
QKeySequenceEdit,
QLabel,
QLineEdit,
QPushButton,
QRadioButton,
QTabWidget,
QVBoxLayout,
QWidget,
)
except ImportError:
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import (
QButtonGroup,
QCheckBox,
QComboBox,
QDialog,
QDialogButtonBox,
QGroupBox,
QHBoxLayout,
QKeySequenceEdit,
QLabel,
QLineEdit,
QPushButton,
QRadioButton,
QTabWidget,
QVBoxLayout,
QWidget,
)
util.py
#from PyQt5.QtCore import Qt
#from PyQt5.QtGui import QKeySequence
#from PyQt5.QtWidgets import QAction, QMenu, QSpinBox
try:
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QKeySequence
from PyQt6.QtWidgets import QMenu, QSpinBox
from PyQt6.QtGui import QAction
except ImportError:
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QKeySequence
from PyQt5.QtWidgets import QAction, QMenu, QSpinBox
importer.py
try:
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import (
QAbstractItemView,
QDialog,
QDialogButtonBox,
QListWidget,
QListWidgetItem,
QVBoxLayout,
)
except ImportError:
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (
QAbstractItemView,
QDialog,
QDialogButtonBox,
QListWidget,
QListWidgetItem,
QVBoxLayout,
)
schedule.py
try:
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import (
QAbstractItemView,
QDialog,
QDialogButtonBox,
QHBoxLayout,
QListWidget,
QListWidgetItem,
QPushButton,
QVBoxLayout,
)
except ImportError:
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (
QAbstractItemView,
QDialog,
QDialogButtonBox,
QHBoxLayout,
QListWidget,
QListWidgetItem,
QPushButton,
QVBoxLayout,
)