zjosua / Pokemanki

Catch and train Pokémon as you learn with Anki
https://ankiweb.net/shared/info/1041307953
Other
19 stars 5 forks source link

[Bug] Trade error #2

Closed Ben-Judah closed 2 years ago

Ben-Judah commented 2 years ago

Hello there,

Today I've encoutered this error while opening the trade window. It hasn't appeared before, this is the first time.

Here's the error log

"Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2022-09-28 09:17:02

Caught exception:
Traceback (most recent call last):
  File "C:\Users\Ben-Judah\AppData\Roaming\Anki2\addons21\1041307953\trades.py", line 284, in tradeFunction
    </table>""" % (self.dirname, self.trades[0][0][0], self.dirname, self.trades[1][0][0], self.dirname, self.trades[2][0][0], self.trades[0][0][0], self.trades[1][0][0], self.trades[2][0][0], self.mediafolder, self.trades[0][1][0], self.mediafolder, self.trades[1][1][0], self.mediafolder, self.trades[2][1][0], self.trades[0][1][0], self.trades[1][1][0], self.trades[2][1][0])
IndexError: list index out of range"

Regards

Ben-Judah commented 2 years ago

Just to give an update - yesterday the same error occured, however today the trade option is working just as fine. It's an error that can appear but doesn't always do so

zjosua commented 2 years ago

It would be helpful if you could reproduce the error with version 1.1.1, where it would be possible to tell which of those list references causes the error. In version 1.0.0 they are all on the same line.

zjosua commented 2 years ago

@Ben-Judah the code section your error log refers to has since been removed in #7. Did the error come up in any recent releases?

Ben-Judah commented 2 years ago

Sorry for not getting back to you sooner @zjosua

I've been trying to wait and check if the error reappeared or if somehow the newer releases had already solved it. So far the error hasn't reappeared, and I've seen that the new trade window has showed, sometimes, either trades that included the same pokemon twice in 2 of the 3 trades, or just 2 trades at all instead of 3. I believe these situations were highly likely the ones that would cause the error to appear, and since those same situations are now presented in a stable presentation without any log error, I would say the problem has been solved :)

zjosua commented 2 years ago

Thanks for the feedback.