JaseZiv / worldfootballR

A wrapper for extracting world football (soccer) data from FBref, Transfermark, Understat
https://jaseziv.github.io/worldfootballR/
433 stars 59 forks source link

Error in fotmob_get_match_players() in some matches #291

Closed cg86x closed 1 year ago

cg86x commented 1 year ago

fotmob_get_match_players() works for most games, but shows an error in roughly 10% of match ids. Errors seem to be more common in older matches. From my own exploration, it seems to have something to do with certain stats not being present in the API for some matches (minutes played for example).

fotmob_get_match_players(3564654) Error: ℹ In index: 1. Caused by error in dplyr::bind_rows(): ! Can't combine ..1$stats and ..5$stats .

A tibble: 0 × 1

ℹ 1 variable: match_id

Below are example matches with (primarily) the same error shown above. These are from Brazilian Serie A but I've encountered the issue with many other leagues as well.

[1] 2999748 2999757 2999754 2999820 2999836 2999840 2999857 2999860 2999870 2999888 2999890 2999902 [13] 2999919 2999936 2999954 2999950 2999940 2999963 2999962 2999977 2999983 2999998 3000001 3000003 [25] 3000000 3000011 3000013 3000020 3000022 3000031 3000040 3000043 3000050 3000055 3000063 3000065 [37] 3000070 3000071 3000087 3000083 3000090 3000089 3000100 3000103 3000112 3288721 3288516 3288535 [49] 3288533 3288528 3288551 3288567 3288576 3288589 3288625 3288622 3288623 3288638 3288637 3288642 [61] 3288648 3288611 3288666 3288689 3288675 3288680 3288700 3288706 3288695 3288692 3288739 3288715 [73] 3288732 3288733 3288742 3288749 3288746 3288770 3288771 3288775 3288790 3288781 3288787 3288784 [85] 3288798 3288777 3288794 3288804 3288820 3288813 3288810 3288815 3288814 3288837 3288833 3288827 [97] 3288830 3288728 3288849 3288852 3288868 3288841 3288867 3288861 3288884 3288885 3288873 3288874 [109] 3288875 3288900 3288894 3288899 3288893 3564291 3564315 3564316 3564321 3564312 3564329 3564339 [121] 3564352 3564362 3564356 3564365 3564366 3564377 3564371 3564386 3564385 3564407 3564416 3564426 [133] 3564428 3564444 3564474 3564654 3821307 3821561

tonyelhabr commented 1 year ago

should be fixed by #294