Unlucky-Life / ankimon

Ankimon is a Anki Addon to Gamify your learning experience
Other
41 stars 5 forks source link

Add on startup failed #42

Closed asap-locky closed 4 months ago

asap-locky commented 4 months ago

image Add on startup failed

So the add on startup was successful the first time, but then when I went to download the resources anki timed out and I had to close the app. I tried to re-open it but was getting this error. So I uninstalled and reinstalled, and am still getting this error.

Thank you so much for the creation of this app and for helping me. I'm very excited to use it!

debugging code: Anki 23.12.1 (1a1d4d54) (ao) Python 3.9.15 Qt 6.6.1 PyQt 6.6.1 Platform: Windows-10-10.0.22631

When loading Ankimon by Unlucky-life: Traceback (most recent call last): File "C:\Users\User\AppData\Roaming\Anki2\addons21\1908235722__init.py", line 1189, in generate_random_pokemon base_experience = search_pokeapi_db_by_id(id, "base_experience") File "C:\Users\User\AppData\Roaming\Anki2\addons21\1908235722\init__.py", line 2046, in search_pokeapi_db_by_id with open(str(pokeapi_db_path), "r", encoding="utf-8") as json_file: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\User\AppData\Roaming\Anki2\addons21\1908235722\user_files\data_files\pokeapi_db.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "aqt.addons", line 245, in loadAddons File "C:\Users\User\AppData\Roaming\Anki2\addons21\1908235722__init.py", line 2099, in name, id, level, ability, type, stats, enemy_attacks, base_experience, growth_rate, hp, max_hp, ev, iv, gender, battle_status, battle_stats = generate_random_pokemon() File "C:\Users\User\AppData\Roaming\Anki2\addons21\1908235722\init.py", line 1221, in generate_random_pokemon return generate_random_pokemon() # Return the result of the recursive call File "C:\Users\User\AppData\Roaming\Anki2\addons21\1908235722\init.py", line 1221, in generate_random_pokemon return generate_random_pokemon() # Return the result of the recursive call File "C:\Users\User\AppData\Roaming\Anki2\addons21\1908235722\init__.py", line 1223, in generate_random_pokemon showInfo("Error", "Can't open the JSON File.") File "aqt.utils", line 289, in showInfo TypeError: arguments did not match any overloaded call: QMessageBox(parent: Optional[QWidget] = None): argument 1 has unexpected type 'str' QMessageBox(icon: QMessageBox.Icon, title: Optional[str], text: Optional[str], buttons: QMessageBox.StandardButton = QMessageBox.NoButton, parent: Optional[QWidget] = None, flags: Qt.WindowType = Qt.Dialog|Qt.MSWindowsFixedSizeDialogHint): argument 1 has unexpected type 'str'

Unlucky-Life commented 4 months ago

ok, no worries this is an easy fix ! If when downloading - your Anki crashed - you need to go to your ankimon addon folder => go to "user_files" and then delete the files in "data files" folder=> image image image => then you should be able to redownload the needed resources !

asap-locky commented 4 months ago

Hi, thank you so much for your quick response!

so I followed your instructions and tried downloading the resources again. But another error occurred at around 16% downloaded (last time it occurred at 3%) and the program forcibly closed itself.

Do you think this is a bug or instead maybe something wrong with my computer/system? (sorry I don't have much knowledge of computers so just am not sure)

thank you again!