Unlucky-Life / ankimon

Ankimon is a Anki Addon to Gamify your learning experience
Other
38 stars 4 forks source link

Error while doing cards #75

Open CaptainDead opened 2 months ago

CaptainDead commented 2 months ago

I get an error while solving my cards, like this - Screenshot 2024-04-16 225614 Zoomed - image

Recently there is never any popup for the first card, no damage nothing.. and it might persist for long period and sometimes there is no damage from solving cards for a while and then there is a super big damage all of a sudden - Screenshot 2024-04-17 010027 Also my XP bar doesn't get updated after defeating a pokemon (I have to go to deck and come back again to see the xp bar updated) and sometimes I don't get any XP from defeating one pokemones.

Here's a video showing all that - https://pixeldrain.com/u/AU5WjGWh

CaptainDead commented 2 months ago

Oh wait, one thing I just realised is that maybe not getting damage each time is not a issue but rahter its because I changed ["cards_per_round":] to '2' from '1;, I had it at 1 previously thus I was getting damage each card, so ig ignore the no damage things but the error is still an issue

Unlucky-Life commented 2 months ago

@CaptainDead try changing this line in your init.py file: reviewed_cards_count = -1 => to reviewed_cards_count = 0

that was my work around i had before another person came up with the fix. Try changing that line and i think that should fix the issue :)

line 2075 image

Unlucky-Life commented 2 months ago

@CaptainDead the xp bar is propapbly just updating with a lag - but we found a fix for that too - ill add that for the next update

CaptainDead commented 2 months ago

It did made things better, now I give damage/attacks each time and feels smoother but now the only problem is, I still get the above error... and it doesn't come that often, its rare but if I click on good or hard buttons quickly than that error comes very often, especially if I click on the same review button many times. but if I take my time and solve cards normally than the error doesn't come ig.

CaptainDead commented 2 months ago

and btw when will the new update come

Unlucky-Life commented 2 months ago

@CaptainDead Hm this might have two reasons: Reason 1: of your wild pokemon moves are not properly found Reason 2: you are missing certain sprites

Unlucky-Life commented 2 months ago

@CaptainDead The next update should come out this weekend or next

CaptainDead commented 2 months ago

I pasted those images, but it didn't fix the error but its not really a problem as it only happens if I answer cards real fast, and ig this might get solved with the new update maybe

Unlucky-Life commented 2 months ago

hm does it happen with all your main pokemon or just some ?

CaptainDead commented 2 months ago

Perfect... I didn't thought that could be a main specific problem, I changed my main and couldn't recreate it but when I went back to the one I had before, I got the error again.

This is the pokemon that's giving me the error when I have it selected as main - image

btw will the new update have the front looking main pokemone gifs?

Unlucky-Life commented 2 months ago

yes it will ;) and a cool little feature

Unlucky-Life commented 2 months ago

Benutzer 1 - Anki 2024-04-18 17-20-32 If damage is dealt to a pokemon it makes a small shake

CaptainDead commented 2 months ago

Love that, a real nice addition❤️‍🔥

CaptainDead commented 2 months ago

I had a lil suggestion (I have many but dont have time to share), how about having gifs in the 'captured pokemone' window for example like this - Recording 2024-04-18 214408 (1)

Also, there are always three columns (vertical ones) in 'captured pokemon' window - Screenshot 2024-04-18 214455

Even if we stretch the window to a big size, instead of increasing in no. of columns or showing more pokemon, just the size of the box (?) of all Pokemon increases - Screenshot 2024-04-18 214510

It would be great if more pokemon could be seen if we increase the size of the window, something like this -

when small size - (less column) Screenshot 2024-04-18 214431

when big size - (more column) Screenshot 2024-04-18 214441

Not necessary or mandatory things just normal suggestions.

Unlucky-Life commented 2 months ago

the gif integration should be easy

CaptainDead commented 2 months ago

btw do we get XP everytime we defeat a pokemon or sometimes we don't get it? like I smtimes don't get any xp.

Also a lil issue - we get this in the center of screen when we catch a pokemon- Screenshot 2024-04-19 004528

The BG is dark and text is dark too, so its somewhat hard to read. just letting u know. the picture is zoomed in so its easy to read but normally its not very readable.

CaptainDead commented 2 months ago

Also in Charmander, one attack is repeated, so idk its a mistake or on purpose so just letting u know - image

Unlucky-Life commented 2 months ago

@CaptainDead so you have 2 times the same attack for your charmander is fine (not intended but doesnt hurt, maybe you let it relearn scratch)

CaptainDead commented 2 months ago

not talking about the xp bar, I just don't get any XP smtimes, and I get no error just no xp and the rest is normal,

idk why... and I dont know what could be the reasons and its such a bother to try and fix it ig so I don't bother u over it cuz we already worked on it and rn I don't really have time to talk about this issue, so maybe the next update will fix it automatically (such a non-coder mineset😭, like how we think hitting a remote etc at the back will fix it if its not working)

Anyway just wanted to know if we get xp each time, its fine we can work this issue out later when I have the time and the issue persists.

Unlucky-Life commented 2 months ago

@CaptainDead Oh man, sorry to hear that. Sadly the new anki version is as response 2.1.26 was quite responsive for errors - now finding the issue for an error is quite a guessing game....

But maybe it could also be you card_per_round setting - can you try to set it to 2 and see what happens ?

face515 commented 2 months ago

This also happens to me. I think I know the problem. This only happens with my Terrakion. I believe it happens whenever the Bide move is randomly selected. As taking damage is not implemented yet, and Bide makes you wait, it doesn't know what to do. It most likely isn't implemented to wait, and since the opponent will always do 0 damage, multiplying by 0 could throw some error. Every other move works fine. It most likely happens with any move that multiplies the enemy's damage to you. image

face515 commented 2 months ago

Another thing to note is sometimes for me it would choose another move; other times it doesn't. It only chooses another when I am opening the deck(as it chooses an attack everytime that happens). It could even error multiple times while opening the deck. It will keep erroring until it selects a different move.

face515 commented 2 months ago

Can OP send attack details of the problematic pokemon?

Unlucky-Life commented 2 months ago

@face515 Thanks for the information ! Yes its seems like there is a move where the code is trying to fetch a number for a certain value of the move such as (power for example) and then tries to do some kind of calculation with that number => but if there is no number to this key value then it throws an error. Therefore - Might need the code to just always retry to pick a diffrent attack. => Ill try to find out what the specific issue is the coming weeks. But thanks alot for the detailed info ! This does help alot !

CaptainDead commented 2 months ago

ohh I too have a bide attack in the pokemon that was giving me that error - image image

face515 commented 2 months ago

@Unlucky-Life no problem! just happy my pattern recognition can be used for something useful

CaptainDead commented 2 months ago

But maybe it could also be you card_per_round setting - can you try to set it to 2 and see what happens ?

I tried it but didn't work. ngl I thought this might be it as I had that setting as '1' since the start and I am having this problem since the start as well but now I get XP most of the time back then I used to get no XP at all. I've left that settings as '2' now.


I am not sure this is the thing but I feel like I always get XP after defeating a pokemon if I do my cards fast, could that be a thing? cuz when I am normally doing my cards, I sometimes don't get any XP, but when I quickly do cards in my 'experiment' deck, I always get the XP.

Also I always get XP whenever I try to record and show u that I dont XP, cuz at that time also I do the cards quickly.

Some of my decks take >10mins per card so ig that's a lot of time.

Unlucky-Life commented 2 months ago

Hm but i cant see a reason why the time of a card could play into this

Unlucky-Life commented 2 months ago

@CaptainDead do you have any video where i could see when you dont receive xp ?

Unlucky-Life commented 2 months ago

@CaptainDead another user said he doesnt gain xp when defeating the pokemon with the ankimon window open. Maybe that is the cause ?

Unlucky-Life commented 2 months ago

@CaptainDead I think i was able to recreate the bug ! If you defeat a pokemon and open the ankimon window => then defeat the pokemon (defeat screen appears on the ankimon window => then close the ankimon window => then do more cards => new pokemon is generated and no xp is gained (Not even the message appeared) Was that the issue you had ?

WhatsApp Bild 2024-04-30 um 20 50 54_9415a85a