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() #277

Closed cg86x closed 1 year ago

cg86x commented 1 year ago

Getting an error with the below code. Was working as recently as yesterday. ` fotmob_get_match_players(2999743)

Error: ℹ In index: 1. Caused by error in map2(): ℹ In index: 3. Caused by error in map(): ℹ In index: 1. Caused by error in dimnames(X) <- list(dn[[1L]], unlist(collabs[nc > 0], use.names = FALSE)): ! length of 'dimnames' [2] not equal to array extent

A tibble: 0 × 1

ℹ 1 variable: match_id

`

For the record, using Fotmob API directly works fine so it isn't an API issue. I've reinstalled, restarted, and otherwise tried all options to resolve the error.

Using Mac OS, package version 0.6.3.3.

tonyelhabr commented 1 year ago

not entirely sure if there is an easy fix. looks like they added an extra layer of nesting

image

tonyelhabr commented 1 year ago

ok i made some progress tracking down the bug. seems like there's an issue with as.matrix.data.frame() when t() is called here. working on a fix now

addendum to my last comment: i'm not actually sure the level of nesting changed at all

cg86x commented 1 year ago

This is great - thanks for taking a look and getting to the bottom of it!

Gyracat commented 1 year ago

Now , I can run this function?