Open jack89roberts opened 2 years ago
Thanks @chahak13 , not something I've seen before but it doesn't particularly surprise me either. Haven't looked at it properly but I think most likely what's happened is the database fields have been updated/changed without the dump script being updated to reflect that.
@jack89roberts got it. I'll try to resolve it while doing #382 if it doesn't take a lot of effort, otherwise will work on it on a different PR later.
Okay, this was straightforward. I fixed it. I'll add the commit to the same PR as #382.
@jack89roberts while working on this, I came across an error that I'm not sure is known. On trying to dump the database, I get this error
I suspect that this is because of this line https://github.com/alan-turing-institute/AIrsenal/blob/359ebbc2e52272fb1bedbd62a92c9e6fdb0b1981/airsenal/scripts/dump_db_contents.py#L24
Which says that only
player_id
, andname
are to be written to csv whereas in the write function, https://github.com/alan-turing-institute/AIrsenal/blob/359ebbc2e52272fb1bedbd62a92c9e6fdb0b1981/airsenal/scripts/dump_db_contents.py#L171-L180It iterates over all fields of the Player object which also has
fpl_api_id
. I was confused if it's known or not because the line settingplayer_fieldnames
was committed a while ago and hasn't been updated. Is this a known issue that needs a fix?Originally posted by @chahak13 in https://github.com/alan-turing-institute/AIrsenal/issues/382#issuecomment-1024830496