krassowski / Anki-TouchScreen

Touchscreen functionality for Anki
https://ankiweb.net/shared/info/1631622775
GNU General Public License v3.0
25 stars 13 forks source link

[Anki 23.10 beta 6] No module named 'PyQt5' #27

Open khonkhortisan opened 11 months ago

khonkhortisan commented 11 months ago

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.

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 '⁨Touch Screen - draw and write on your cards⁩':
⁨Traceback (most recent call last):
  File "aqt.addons", line 239, in loadAddons
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\1631622775\__init__.py", line 31, in <module>
    from PyQt5.QtWidgets import QAction, QMenu, QColorDialog, QMessageBox, QInputDialog
ModuleNotFoundError: No module named 'PyQt5'

1631622775__init__.py

#from PyQt5.QtWidgets import QAction, QMenu, QColorDialog, QMessageBox, QInputDialog
#from PyQt5 import QtCore
#from PyQt5.QtGui import QKeySequence
#from PyQt5.QtGui import QColor
#from PyQt5.QtCore import pyqtSlot as slot
try:
    from PyQt6.QtWidgets import QMenu, QColorDialog, QMessageBox, QInputDialog
    from PyQt6.QtGui import QAction
    from PyQt6 import QtCore
    from PyQt6.QtGui import QKeySequence
    from PyQt6.QtGui import QColor
    from PyQt6.QtCore import pyqtSlot as slot
except ImportError:
    from PyQt5.QtWidgets import QAction, QMenu, QColorDialog, QMessageBox, QInputDialog
    from PyQt5 import QtCore
    from PyQt5.QtGui import QKeySequence
    from PyQt5.QtGui import QColor
    from PyQt5.QtCore import pyqtSlot as slot