RisingOrange / anki-mindmap

MIT License
4 stars 3 forks source link

TypeError: C++ type 'QWebEngineDownloadItem*' is not supported as a pyqtSlot argument type #13

Open GrimPixel opened 2 years ago

GrimPixel commented 2 years ago

An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.

When loading '⁨Mindmap from tag hierarchy⁩': ⁨Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/aqt/addons.py", line 244, in loadAddons import(addon.dir_name) File "/home/grim/.local/share/Anki2/addons21/965278890/init.py", line 13, in from .mindmap_creator_dialog import show as show_dialog File "/home/grim/.local/share/Anki2/addons21/965278890/mindmap_creator_dialog.py", line 12, in from .libaddon.gui.dialog_webview import WebViewer File "/home/grim/.local/share/Anki2/addons21/965278890/libaddon/gui/dialog_webview.py", line 47, in class WebViewer(BasicDialog): File "/home/grim/.local/share/Anki2/addons21/965278890/libaddon/gui/dialog_webview.py", line 89, in WebViewer @pyqtSlot("QWebEngineDownloadItem") TypeError: C++ type 'QWebEngineDownloadItem' is not supported as a pyqtSlot argument type ⁩

MVilj commented 1 year ago

I am getting this same error on both, desktop and laptop with newest versions of both anki and graphviz

khonkhortisan commented 1 year ago

[worksforme] comment out this line for it to work https://github.com/RisingOrange/anki-mindmap/blob/dd3eaa8c198fa4abe40b480f625941210462ed86/src/mindmap/libaddon/gui/dialog_webview.py#L89 C:\Users\%username%\AppData\Roaming\Anki2\addons21\965278890\libaddon\gui\dialog_webview.py:89

#    @pyqtSlot("QWebEngineDownloadItem*")
MVilj commented 1 year ago

[worksforme] comment out this line for it to work

https://github.com/RisingOrange/anki-mindmap/blob/dd3eaa8c198fa4abe40b480f625941210462ed86/src/mindmap/libaddon/gui/dialog_webview.py#L89

C:\Users\%username%\AppData\Roaming\Anki2\addons21\965278890\libaddon\gui\dialog_webview.py:89

#    @pyqtSlot("QWebEngineDownloadItem*")

The error went away and it shows in the addons menu, but its still missing from anki. There is no button or option anywhere to create the mindmap

khonkhortisan commented 1 year ago

windows_10_cmake_Release_graphviz-install-6.0.2-win64.exe installed for all users in corrupted spanish, Anki Versión ⁨2.1.55 (e5c4ccf0)⁩ Python 3.9.7 Qt 6.4.0 PyQt 6.4.0. I opened a new PowerShell and ran the command $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") to make sure it loaded with graphviz in the path, then recompiled Anki. You may have to reboot to add graphviz to the path if you don't use the terminal. Remove the pyqtSlot line, open Anki, press B to open the browser, it says Mind map→Create a mind map imagen I open the pop-up, type in a valid tag UG and click Show. It works except I also had to fix scroll-to-zoom on the image with that pull request.