Unlucky-Life / ankimon

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

An error occured in reviewer: 'NoneType' object has no attribute 'mapToGlobal' #21

Closed nurkittel closed 4 months ago

nurkittel commented 4 months ago

Every time my Pokemon defeats another this message 'An error occured in reviewer: 'NoneType' object has no attribute 'mapToGlobal'' as a popup appears after I close the 'Your pokemon is now lvl ...' popup.

Strange that the first few level worked without that issue. I have the Ankimon Window not open and I can not choose between defeat or catch. Only the popups appear. After that I can open the Ankimon window and choose defeat/catch. If I choose defeat the level up popup appears again but still no level up. If I continue doing reviews no new pokemon appears and I have to restart.

My pokemon does not get that level up after the restart.

Thanks again.

Unlucky-Life commented 4 months ago

Could give more infos ? Like what level is your Pokemon now ? could you check how much xp your mainpokemon has ? Does this happen with all pokemon or only with a specific one?

nurkittel commented 4 months ago

Lvl 11 with 208exp. I will check if it happen with other as well give me a few minutes.

nurkittel commented 4 months ago

No, other Pokemon works fine. But during the last defeat I could not choose between defeat/catch and the popup level up appeared and the enemy pokemon was defeated. I don't know if that is intended. Did not have ankimon windows open.

Unlucky-Life commented 4 months ago

So without a ankimon window you cant catch any pokemon but only defeat them - it was thought to be „grind mode“ where you can simply concentrate on leveling your pokemon and wont be annoyed by the ankimon window changing and having to decide/ press any other buttons

Unlucky-Life commented 4 months ago

could you send me the trade code of your charmander ?

nurkittel commented 4 months ago

Can I send you the files?

mainpokemon.json mypokemon.json

Unlucky-Life commented 4 months ago

ok just tried it out and i didnt have the leveling issue => Maybe it was due to a generation of new pokemon (which was quite an often error at the moment) But with the new creation logic of new pokemon it should be fixed (Hopefully)!

nurkittel commented 4 months ago

Thanks. Yea the generation of new pokemon is sometimes off. I only selected in config to include gen1 and gen2. But sometimes after a few fights it shows a new gen 3,4,5... pokemon. That's the moment I know something is off and I have to restart because I know it won't give exp if that happens.

Unlucky-Life commented 4 months ago

mainpokemon.json mypokemon.json

=> There you go with a level up 👍 :) => Charmander has dragonbreath now ;)

I also corrected the move set from ponyta and growlithe

nurkittel commented 4 months ago

An error occured in reviewer: 'NoneType' object has no attribute 'mapToGlobal' I am getting the error again every time my pokemon gets a new level. Popup directly after the 'your pokemon reached level...' New install. First level wer fine now it's lvl 9 and every level it appears. And in Pokemon collection it still shows level 9.

Unlucky-Life commented 4 months ago

Can you imagine something sopecific that could create this bug ? Does this happen in reviewer or with the ankimon window ?

Unlucky-Life commented 4 months ago

Ok i may have found the issue now - its somehow the message boxes in anki which are the issue

CHeadn commented 4 months ago

Also having this same issue with my totadile but no others

liu1234567891011 commented 4 months ago

having same issue with my charmander

liu1234567891011 commented 4 months ago

stuck at level 6

Unlucky-Life commented 4 months ago

ok might have a fix now. Please redownload this file: https://github.com/Unlucky-Life/ankimon/blob/b66509a8004db069cfce4ef826ca7e031ee265d7/src/Ankimon/__init__.py

And overwrite the init.py file in the ankimon addon folder. I hope this should solve the issue.

Unlucky-Life commented 4 months ago

@nurkittel

i tried to recreate the bug - with and without ankimon window - but wasnt able to. Seems like this is a mac issue which appears due to mac not able to check the windows coordinates. The error was due to the message window not be able to find the proper coordinates. => Let me know if this resolved the issue !

CHeadn commented 4 months ago

ok might have a fix now. Please redownload this file: https://github.com/Unlucky-Life/ankimon/blob/b66509a8004db069cfce4ef826ca7e031ee265d7/src/Ankimon/__init__.py

And overwrite the init.py file in the ankimon addon folder. I hope this should solve the issue.

This fixed the problem thanks!

nurkittel commented 4 months ago

Fixed! Thanks! I learned a new attack for the first time as well. The 'new attack learned' window, I have never seen before only the error, might have been the reason the problem appeared and didn't appear during the first level.

Unlucky-Life commented 4 months ago

Yea maybe - but apparently something screwed around with Anki not being able to find the coordinates of the active anki window right now => so it didnt know where to place the Reviewer Message and therefore saying "NoneType" => basically saying: There is no window i can refer the coordinates to.

liu1234567891011 commented 4 months ago

works noow thanks