glutanimate / batch-editing

Batch Editing add-on for Anki
https://ankiweb.net/shared/info/291119185
Other
15 stars 7 forks source link

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

Closed khonkhortisan closed 10 months ago

khonkhortisan commented 10 months ago

Problem description

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.

Checklist

Information about your Anki set-up


    Anki 23.10 (72e57456) Python 3.9.15 Qt 6.5.2 PyQt 6.5.2
    Platform: Windows-10-10.0.19045
    Flags: frz=True ao=True sv=3
    Add-ons, last update check: 2023-10-14 10:11:10

    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    '' ['DecksAddBrowseStatsSync', 0, 'None', '']
    '' ['decknamebackgroundimage', 0, 'None', '']
    '' ['enableplover', 0, 'None', '']
    '' ['numbers2stripes █▓▒░', 0, 'None', '']
    '' ['tagtovlc', 0, 'None', mod]
    Add Table ['1237621971', 2023-06-18T04:37, 'None', '']
    Advanced Browser ['874215009', 2023-07-01T12:55, 'None', '']
    Advanced Review Bottom Bar ['1136455830', 2023-09-16T13:48, 'None', '']
    Anki Browser Context Menu Search ['422526650', 2019-11-13T12:21, 'None', '']
    Anki JavaScript API ['1490471827', 2021-02-19T12:54, 'None', '']
    Anki Killstreaks ['579111794', 2021-12-15T07:20, 'None', '']
    AnkiBrain AnkiChatGPT - GPT-4 GPT 35 Complete Integration ['1915225457', 2023-09-27T22:50, 'None', '']
    AnkiCollab - The free collaboration Platform ['1957538407', 2023-09-30T02:19, 'None', mod]
    AnkiConnect ['2055492159', 2023-04-11T10:20, 'None', mod]
    AnkiWebView Inspector ['31746032', 2023-06-27T12:26, 'None', '']
    Ankicord - Discord Rich Presence ['1828536813', 2023-08-16T08:53, 'None', '']
    AnnA Companion Anki neuronal Appendix - do LESS reviews with MORE retention ['447942356', 2022-02-09T05:05, 'None', '']
    Answer Visual Confirmation ['1208806023', 2008-04-21T12:27, 'None', '']
    Batch Editing ['291119185', 2019-06-04T16:10, 'None', '']
    Bury After Fail Streak ['966431904', 2023-06-06T07:14, 'None', '']
    Change Interface Font ['1431333984', 2023-07-20T23:17, 'None', mod]
    Cloze Hide All ['1709973686', 2021-09-11T03:00, '21.9.11i107', mod]
    Cloze Overlapper for Anki 21 ['109531687', 2021-01-11T19:12, 'None', '']
    Contanki - Controller Support for Anki beta ['1898790263', 2023-02-01T17:04, 'v0.9.2-beta', mod]
    Content Injector ['166455199', 2020-09-03T09:08, 'None', mod]
    Deck Browser CSS ['153779542', 2022-10-18T08:53, 'None', '']
    Edit Field During Review Cloze ['385888438', 2023-10-08T20:54, '6.16', mod]
    Edit LaTeX build process ['937148547', 2018-10-12T14:33, 'None', mod]
    Enhance main window ['877182321', 2023-01-15T23:50, 'None', mod]
    FSRS4Anki Helper ['759844606', 2023-10-14T00:09, 'None', mod]
    Highlight Search Results in the Browser ['225180905', 2021-03-10T09:06, 'None', '']
    HyperTTS - Add speech to your flashcards ['111623432', 2023-08-30T21:32, 'None', mod]
    Image Occlusion Enhanced ['1374772155', 2022-04-09T00:15, 'None', '']
    Incremental Reading v4118 unofficial clone ['999215520', 2023-07-31T22:57, 'None', '']
    IntelliFiller ChatGPT ['1416178071', 2023-06-29T11:23, '1.1.0', '']
    Kanji Grid ['909972618', 2019-01-09T14:40, 'None', mod]
    Leaderboard ['41708974', 2023-01-15T02:53, 'None', mod]
    Learn now  Grade now ['1021636467', 2023-05-09T15:09, 'None', '']
    MathJax to LaTeX if it contains a command ['1342506526', 2020-05-20T18:15, 'None', '']
    Migaku Chinese ['498302176', 2021-04-12T15:29, 'None', mod]
    Migaku Retirement ['1666520655', 2021-01-13T16:37, 'None', mod]
    Mindmap from tag hierarchy ['965278890', 2022-11-16T02:55, 'None', '']
    MorphMan for Anki 21 ['900801631', 2023-08-17T19:37, 'None', '']
    Neo Anki Leaderboard ['1894428367', 2023-03-09T12:27, 'None', mod]
    Opening the same window multiple time ['354407385', 2020-05-15T17:59, 'None', '']
    Play a celebrationcompletion sound when you finish your deck ['978869609', 2023-09-29T10:08, 'None', mod]
    Progress Bar cards done cards left secondscard time spentleft and ETA ['1097423555', 2023-10-02T01:05, 'None', mod]
    Rendered Browser ['993394845', 2022-07-04T14:55, 'None', '']
    Review Heatmap ['1771074083', 2022-06-29T18:43, 'None', '']
    Review Hotmouse ['1928346827', 2022-05-16T21:25, '2.6', mod]
    Ruzu Pop-ups ['1736169259', 2022-12-26T17:07, 'v0.0.4', mod]
    Touch Screen - draw and write on your cards ['1631622775', 2019-04-20T12:26, 'None', '']
    True Retention by Card Maturity Simplified ['1779060522', 2020-06-28T06:45, 'None', '']
    add-on dialog searchfilter bar ['561945101', 2023-06-15T05:39, 'None', '']
    extended editor for field for tables searchreplace ['805891399', 2023-07-31T07:12, 'None', mod]
    link Cards Notes and Preview them in extra window ['1423933177', 2023-03-19T11:33, 'None', '']
    right hand reviews  hjkl answer shortcuts  Handy Answer Keys configurable ['850294128', 2023-05-24T01:59, 'None', mod]

    ===IDs of active AnkiWeb add-ons===
    1021636467 109531687 1097423555 111623432 1136455830 1208806023 1237621971 1342506526 1374772155 1416178071 1423933177 1431333984 1490471827 153779542 1631622775 166455199 1666520655 1709973686 1736169259 1771074083 1779060522 1828536813 1894428367 1898790263 1915225457 1928346827 1957538407 2055492159 225180905 291119185 31746032 354407385 385888438 41708974 422526650 447942356 498302176 561945101 579111794 759844606 805891399 850294128 874215009 877182321 900801631 909972618 937148547 965278890 966431904 978869609 993394845 999215520

    ===Add-ons (inactive)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    '' ['MorphMan', 0, 'None', '']
    '' ['TitleAgo', 0, 'None', '']
    '' ['autoLearningSteps', 0, 'None', '']
    '' ['cloze_overlapper', 0, 'None', '']
    '' ['countnotifier', 0, 'None', '']
    '' ['deckpercentnotch', 0, 'None', '']
    '' ['fsrs4anki-helper', 0, 'None', mod]
    '' ['speech-to-text', 0, 'None', '']
    3 add-ons merged quicker anki explain deletion explain database check ['777545149', 2019-09-26T06:03, 'None', '']
    ActivityWatch for Anki ['567877061', 2023-10-07T15:05, 'None', '']
    Add Card Do First Review ['1394953283', 2020-11-11T06:40, 'None', '']
    Add Parent Tag To Every Tag In A Deck ['543106186', 2019-11-20T18:30, 'None', '']
    Advanced Answer Sounds ['1167194350', 2022-05-29T00:30, 'None', '']
    Advanced Copy Fields ['1898445115', 2019-05-03T11:46, 'None', '']
    Almost Mandatory Tags ['1386232247', 2022-12-28T09:51, 'None', '']
    Anki Preview Reloader ['571150035', 2023-04-22T12:29, '1.0.0', '']
    Anki Simulator ['817108664', 2021-08-07T12:24, 'None', '']
    Anki Time anti-distraction helper ['998250600', 2023-01-09T05:44, 'None', '']
    Anki X Markdown X MindMap ['728482867', 2022-07-08T21:07, 'None', '']
    Anki Zoom ['538879081', 2020-04-03T17:20, 'v1.1.3', '']
    Anki with Friends ['613520216', 2022-02-05T08:40, 'None', mod]
    Anki-redesign ['308574457', 2023-02-04T10:43, 'None', mod]
    AnkiFlash Flashcards Importer Vietnamese English Japanese Chinese French ['1129289384', 2021-11-27T11:52, 'None', '']
    AnkiHub ['1322529746', 2023-10-10T04:54, 'None', mod]
    AnkiOCR ['450181164', 2021-09-18T22:55, 'None', '']
    AnkiPet - gamify your learning by caring for a pet ['1296038972', 2021-05-18T00:18, 'None', '']
    Ankimote - remote to control Anki from your phone ['149004221', 2021-08-11T09:57, 'None', '']
    Asset Manager ['656021484', 2021-08-29T14:07, 'None', '']
    Auto Ease Factor ['1672712021', 2021-03-21T11:11, 'None', mod]
    AutoDefine - Automatically define vocabulary words with pronunciations and image ['2136497008', 2020-11-15T15:16, 'None', mod]
    AwesomeTTS - Add speech to your flashcards ['1436550454', 2023-07-24T16:48, 'None', '']
    Browser TableEditor side-by-side horizontal split ['831846358', 2022-01-25T14:11, 'None', '']
    CC-CEDICT for Anki Chinese dictionary ['418828045', 2022-03-23T05:22, 'None', mod]
    CN Bulk Generate Chinese Hanzi Homophone List to field ['1709020234', 2017-09-18T00:41, 'None', '']
    Chinese Companion - frequency sort HSK suspend heisig support and more ['2129668097', 2019-05-20T01:02, 'None', '']
    Chinese Pinyin Translator Zhuyin Bopomofo Gwoyeu Romatzyh ['1792056402', 2018-11-08T19:27, 'None', mod]
    Chinese Prestudy ['882364911', 2020-11-02T22:43, 'None', '']
    Chinese Stats ['1959794557', 2022-01-29T23:06, 'None', mod]
    Chinese Support Redux v0142 ['1128979221', 2021-03-28T19:19, 'None', mod]
    Chinese Vocabulary Generator ['1370756741', 2021-02-24T00:07, 'None', '']
    Chinese Words Finder ['2048169015', 2020-07-07T05:32, 'None', '']
    Chinese-Text-Scanner ['2121493325', 2020-06-27T21:53, 'None', mod]
    Cloze Anything ['330680661', 2021-12-08T23:34, 'None', '']
    Color Confirmation ['1084228676', 2020-03-14T05:13, 'None', mod]
    Colorful Tags  Hierarchical Tags ['594329229', 2022-09-15T08:06, 'None', '']
    Congrats Confetti ['206062158', 2023-01-16T20:02, 'None', '']
    Convert Subdecks to Tag Hierarchy ['1172858842', 2023-02-07T10:15, 'None', '']
    Cookie monster ['1501583548', 2018-04-13T02:38, 'None', '']
    Correcting a bug in anki which makes new card appearing in wrong order ['127334978', 2019-12-09T01:38, 'None', '']
    Countdown To Events and Exams ['1143540799', 2022-06-27T04:50, 'None', '']
    Create subs2srs cards with mpv  interactive subs ['832294226', 2023-03-08T03:45, 'None', '']
    CrowdAnki JSON exportimport Edit history Collaborate on deck creation ['1788670778', 2023-07-14T17:31, 'None', '']
    Custom Background Image and Gear Icon ['1210908941', 2023-04-18T18:19, 'None', mod]
    Deck Counts NowLater ['1836212767', 2020-09-09T08:33, 'None', '']
    DeepL Translator ['972129549', 2022-07-30T15:16, '1.0.0', mod]
    Delay siblings ['1369579727', 2022-06-03T16:05, 'None', mod]
    DrawingPad ['370778248', 2023-09-16T12:49, 'None', '']
    Editor Live Preview ['1960039667', 2023-09-25T02:56, 'None', mod]
    Enhanced Cloze for Anki 21 ['1990296174', 2023-09-10T11:48, 'None', '']
    Extended Card Stats During Review ['1008566916', 2017-08-29T11:59, 'None', '']
    Fast Word Query Multi-threaded queries for words from local or web dictionaries ['1807206748', 2019-06-22T20:10, 'None', '']
    Fast cards reposition ['544982740', 2021-09-19T06:51, 'None', '']
    Fill the blanks - Multiple typecloze support ['1933645497', 2023-05-03T11:21, 'None', '']
    Find and Replace in Notetypes ['992153575', 2023-08-18T20:14, 'None', '']
    Fix invalid card IDs ['196231552', 2021-11-25T17:33, 'None', '']
    Flag label ['671965183', 2023-03-22T01:44, 'None', '']
    Flexible Cloze ['1632356464', 2023-01-21T08:04, 'None', '']
    Grid Fields ['796923308', 2021-04-09T12:09, 'None', '']
    HTML Window source ['1214415810', 2020-02-18T05:20, 'None', '']
    Hitmarkers ['1776869150', 2020-03-31T15:04, 'None', '']
    Large and Colorful Buttons ['1829090218', 2018-10-02T10:41, 'None', '']
    Life Drain ['715575551', 2023-06-20T04:41, 'None', mod]
    LilyPond sheet music typesetting integration ['1080109152', 2021-09-28T15:16, 'None', mod]
    Markdown and KaTeX Support ['1087328706', 2023-05-06T04:28, 'None', '']
    Memory Status Bar and Stats ['1582352817', 2023-02-28T09:04, 'None', '']
    Migaku Anki Add-on ['1846879528', 2023-09-20T01:24, 'None', mod]
    More Decks Stats and Time Left ['1556734708', 2023-09-24T07:08, 'None', '']
    More Overview Stats ['2116130837', 2022-09-16T10:56, 'None', '']
    Motivanki ['663438166', 2022-06-23T08:38, 'None', '']
    Multiple Choice for Anki ['1566095810', 2023-07-20T02:59, 'None', '']
    No Distractions Full Screen Clean review interface WORKING ['1799768115', 2022-11-20T11:04, 'v4.1.8', mod]
    Photo-episodic 20 ['1989739687', 2020-08-26T17:15, 'None', '']
    Pokemanki ['633922407', 2021-02-24T10:49, 'None', '']
    Pop-up Wikipedia Beta ['395343016', 2020-01-08T19:58, 'None', '']
    Puppy Reinforcement ['1722658993', 2020-03-02T12:23, 'None', '']
    Quick note and deck buttons Fork for 21 ['1331140127', 2022-05-23T06:13, 'None', '']
    Quizlet to Anki 21 Importer with audio support ['1362209126', 2023-06-18T06:31, 'None', '']
    ReColor ['688199788', 2023-04-24T05:23, '2.5', mod]
    Readable Addons Folder ['5720472', 2023-04-15T19:51, 'None', '']
    Remaining time for Anki 21 ['1508357010', 2020-12-13T06:14, '20.12.13i151', '']
    RuneScape-Gamification ['931346754', 2022-12-27T13:06, 'None', '']
    Search and Replace Tags ['138501288', 2018-02-08T16:03, 'None', '']
    Searching PDF Reading  Note-Taking in Add Dialog ['1781298089', 2022-08-15T00:22, 'None', mod]
    Semantic HTML tags in editor ['844409145', 2019-03-20T15:26, 'None', mod]
    Show answer with number keys ['188886658', 2021-03-08T09:35, 'None', '']
    Speed Focus Mode auto-alert auto-reveal auto-answer ['1046608507', 2022-12-16T03:24, 'None', '']
    Stats Overview Pie Graph with Distinct Learning and-or Relearning Sections ['1828603731', 2019-03-27T13:38, 'None', '']
    Stats Plus ['1009670238', 2021-03-04T04:23, 'None', '']
    Study Time Stats ['1247171202', 2023-09-28T09:30, 'None', '']
    Test Your Pronunciation Cloud Speech to Text ['673333980', 2021-04-16T07:34, 'None', '']
    Update lookup Tags ['1715601279', 2018-11-19T10:25, 'None', '']
    Web Browser - Search terms Import texts and images automatically ['864545277', 2022-08-02T13:49, 'None', mod]
    Write on your screen ['567651868', 2023-03-10T22:58, 'None', '']
    YT Subs2SRS ['1633834851', 2020-03-19T05:43, 'None', '']
    Yomisama JapaneseChinese ['907186589', 2020-07-24T10:18, 'None', '']
    Youtubes Video to SRS Deck ['1023383878', 2021-12-05T05:59, 'None', '']
    ZIM Reader ['951350249', 2023-02-21T13:12, 'None', mod]
    maobi - Chinese Hanzi Writing Quizzes in Anki v0 5 2 ['931477147', 2021-02-21T09:14, 'None', mod]
    numbers2polyhedrastripes ['2088639269', 2023-06-29T03:18, 'None', '']

imagen

Error message (if any)

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 '⁨Batch Editing⁩':
⁨Traceback (most recent call last):
  File "aqt.addons", line 239, in loadAddons
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\291119185\__init__.py", line 41, in <module>
    from . import main  # noqa: F401
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\291119185\main.py", line 54, in <module>
    initializeQtResources()
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\291119185\gui\__init__.py", line 41, in initializeQtResources
    from . import resources  # noqa: F401
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\291119185\gui\resources\__init__.py", line 41, in <module>
    from .anki21 import *  # noqa: F401
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\291119185\gui\resources\anki21\__init__.py", line 20, in <module>
    from . import icons_rc
  File "C:\Users\Khonkhortisan\AppData\Roaming\Anki2\addons21\291119185\gui\resources\anki21\icons_rc.py", line 9, in <module>
    from PyQt5 import QtCore
ModuleNotFoundError: No module named 'PyQt5'

fixes: icons_rc.py

#from PyQt5 import QtCore
try:
    from PyQt6 import QtCore
except ImportError:
    from PyQt5 import QtCore

main.py

        #f_hbox.setAlignment(Qt.AlignLeft)
        f_hbox.setAlignment(Qt.AlignmentFlag.AlignLeft)

        #button_box = QDialogButtonBox(Qt.Horizontal, self)
        button_box = QDialogButtonBox(Qt.Orientation.Horizontal, self)
        adda_btn = button_box.addButton("Add &after",
                                        #QDialogButtonBox.ActionRole)
                                        QDialogButtonBox.ButtonRole.ActionRole)
        addb_btn = button_box.addButton("Add &before",
                                        #QDialogButtonBox.ActionRole)
                                        QDialogButtonBox.ButtonRole.ActionRole)
        replace_btn = button_box.addButton("&Replace",
                                           #QDialogButtonBox.ActionRole)
                                           QDialogButtonBox.ButtonRole.ActionRole)
        close_btn = button_box.addButton("&Cancel",
                                         #QDialogButtonBox.RejectRole)
                                         QDialogButtonBox.ButtonRole.RejectRole)

    #dialog.exec_()
    dialog.exec()
Arthur-Milchior commented 10 months ago

Same crash here. Thanks @khonkhortisan for the fix!

glutanimate commented 10 months ago

Thanks for the report! This (and other 23.10 compat issues) are fixed in v0.4.0. Should be up on AnkiWeb now.