RisingOrange / anki-mindmap

MIT License
4 stars 2 forks source link

Error (older version of Anki) #7

Closed Cubicle13 closed 3 years ago

Cubicle13 commented 3 years ago

This add-on sounds amazing, but doesn't seem to be working. Every time I try to show or save a mindmap it gives me an error message (see debug info below). I've downloaded and installed version 2.47.1 of graphviz using the EXE installer for Windows 10 (64-bit).

How can I get this addon to work?

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site. Debug info: Anki 2.1.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-05-19 16:13:52

Caught exception: Traceback (most recent call last): File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap_creator_dialog.py", line 46, in _on_show_button_click self._save_mindmap_to_file(f.name) File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap_creator_dialog.py", line 89, in _save_mindmap_to_file mindmap = TagMindmap(self.dialog.tag_prefix_lineedit.text()) File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap.py", line 21, in init self.notes_by_path = self._initialize_notes_by_path() File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap.py", line 53, in _initialize_notes_by_path notes = get_notes(f'"{self.query_term}:{self.root_path}*"') File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\anki_util.py", line 41, in get_notes for id in mw.col.find_notes(search_string) AttributeError: '_Collection' object has no attribute 'find_notes'

RisingOrange commented 3 years ago

The problem is that you have an older version of Anki (2.1.22). I will look into how to make the add-on work on this version and will write you when it's ready.

Cubicle13 commented 3 years ago

I'm fine with updating, however the the avgEase addon nééds to work in order for my learning process. I saw you had an updated version of it. Does it function the same?

RisingOrange commented 3 years ago

Yes, the only difference is that it starts to adjust the initial ease factors only once there are 50 mature cards in a deck option group.

RisingOrange commented 3 years ago

Hm and I think the original add-on didn't adjust the ease factors at startup. Mine does. Edit: The original add-on also did that.

Cubicle13 commented 3 years ago

Alright sounds good! I just updated, but now I'm getting errors from a bunch of other addons that don't work. This is going to be a problem. I think backwards compatibility (up to a certain point) is a must, because most other addons that aren't updated as frequently. What is the oldest version of Anki I can run this addon with?

RisingOrange commented 3 years ago

I'm not sure what the oldest such version is, but it certainly works with 2.1.35.

RisingOrange commented 3 years ago

2.1.24 works too.

Cubicle13 commented 3 years ago

Updated and got a new error when pressing show. Save feature works


Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site. Debug info: Anki 2.1.40 (cf446733) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-05-19 16:13:52

Caught exception: Traceback (most recent call last): File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap_creator_dialog.py", line 46, in _on_show_button_click self._save_mindmap_to_file(f.name) File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap_creator_dialog.py", line 106, in _save_mindmap_to_file raise e File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap_creator_dialog.py", line 91, in _save_mindmap_to_file mindmap.save_as_img( File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap.py", line 41, in save_as_img raise e File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890\mindmap.py", line 30, in save_as_img create_mindmap_img( File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890_vendor\brain_dump\graphviz.py", line 112, in create_mindmap_img pygraph.write_svg(output_file_path, prog=pydot_program, encoding='utf-8') File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890_vendor\pydot\pydot.py", line 1603, in new_method self.write( File "C:\Users\Toju\AppData\Roaming\Anki2\addons21\965278890_vendor\pydot\pydot.py", line 1686, in write with io.open(path, mode='wb') as f: PermissionError: [Errno 13] Permission denied: 'C:\Users\Toju\AppData\Local\Temp\tmpul32ua3u'

RisingOrange commented 3 years ago

I uploaded a new version of the add-on to Ankiweb. It should fix the issue with the Show feature.

RisingOrange commented 3 years ago

Does the Show button work for you now? Could you please test it? I am quite certain it does but I would like to know for sure.

Cubicle13 commented 3 years ago

Works perfectly now

RisingOrange commented 3 years ago

Great, thanks!