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
23 stars 8 forks source link

Injured / Suspended players process fail due to team null #141

Closed axel3rd closed 4 years ago

axel3rd commented 4 years ago

Since today (19/12), process fail with:

java.lang.UnsupportedOperationException: The team can't be null here, implement problem (should be filled before)
    at org.blondin.mpg.out.model.Player.getTeam(Player.java:54)
    at org.blondin.mpg.out.InjuredSuspendedEquipeActuClient.getPlayer(InjuredSuspendedEquipeActuClient.java:112)
    at org.blondin.mpg.out.InjuredSuspendedWrapperClient.getPlayer(InjuredSuspendedWrapperClient.java:47)
    at org.blondin.mpg.Main.removeOutPlayers(Main.java:328)
    at org.blondin.mpg.Main.processGames(Main.java:174)
    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)

Root cause: Team name is not displayed on EquipeActu Website.

Sample from: https://www.equipeactu.fr/blessures-et-suspensions/fodbold/france/ligue-1

image

Mail sent to EquipeActu ... but if not fixed soon, solution should be found ASAP.

axel3rd commented 4 years ago

Reopen because with current implementation, a player in a team which can be parsed (no team name, blank logo) is considered in the previous team:

image

=> A team "null" should be considered in the injury/suspended search