axel3rd / mpg-coach-bot

MPG (Mon Petit Gazon) coach bot, to automate and optimize weekly actions
https://axel3rd.github.io/mpg-coach-bot/
MIT License
24 stars 8 forks source link

NPE on players stats data #151

Closed axel3rd closed 4 years ago

axel3rd commented 4 years ago
Exception in thread "main" java.lang.NullPointerException
        at java.util.Date.getMillisOf(Date.java:958)
        at java.util.Date.before(Date.java:917)
        at org.blondin.mpg.stats.MpgStatsClient.getStats(MpgStatsClient.java:40)
        at org.blondin.mpg.Main.getCurrentDay(Main.java:401)
        at org.blondin.mpg.Main.calculateEfficiency(Main.java:365)
        at org.blondin.mpg.Main.processGames(Main.java:170)
        at org.blondin.mpg.Main.processLeague(Main.java:111)
        at org.blondin.mpg.Main.process(Main.java:82)
        at org.blondin.mpg.Main.main(Main.java:67)
axel3rd commented 4 years ago

The root cause is that Player statistics build date (https://api.mlnstats.com/builds) seems invalid:

{
  "3": "2020-01-06T04:30:22.934Z",
  "5": "2020-01-06T04:31:09.290Z"
}
axel3rd commented 4 years ago

Hi @LittleLama,

The root cause is that Player statistics build date (https://api.mlnstats.com/builds) seems invalid:

Sorry to bother you with that, but (following #134) is it normal that que https://api.mlnstats.com/builds endpoint contains only date for Liga & SerieA ?

{
  "3": "2020-01-06T04:30:22.934Z",
  "5": "2020-01-06T04:31:09.290Z"
}

This endpoint which indicates when league data should be updated (https://api.mlnstats.com/leagues/[LeagueName]) is now deprecated ?

Thanks in advance. Best regards

LittleLama commented 4 years ago

Uhm, that bug is weird, I'm going to check that.

Le lun. 6 janv. 2020 à 11:23, Alix Lourme notifications@github.com a écrit :

Hi @LittleLama https://github.com/LittleLama,

The root cause is that Player statistics build date ( https://api.mlnstats.com/builds) seems invalid:

Sorry to bother you with that, but (following #134 https://github.com/axel3rd/mpg-coach-bot/issues/134) is it normal that que https://api.mlnstats.com/builds endpoint contains only date for Liga & SerieA ?

{ "3": "2020-01-06T04:30:22.934Z", "5": "2020-01-06T04:31:09.290Z" }

This endpoint which indicates when league data should be updated ( https://api.mlnstats.com/leagues/[LeagueName]) is now deprecated ?

Thanks in advance. Best regards

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/axel3rd/mpg-coach-bot/issues/151?email_source=notifications&email_token=ABGAOD4OPGGIRDCNTOOH7ELQ4MA4VA5CNFSM4KC4W5K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIFBBSA#issuecomment-571085000, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGAOD4FGA3DM6EN4SE6MW3Q4MA4VANCNFSM4KC4W5KQ .

axel3rd commented 4 years ago

Uhm, that bug is weird, I'm going to check that.

@LittleLama Many thx. It is now better, only id "4" is missing now 😁.