Open darrellberry opened 2 years ago
Sorry for the slow response. Have been busy with other stuff and just saw this today. I'll look into this and do some testing of your proposed fix. As you suggest, this issue of columns that are not always present is a problem in situations like this and I'm surprised it hasn't come up before now.
@darrellberry I think you may not be using the latest version. There was an update on 15 Mar 2021 that moved away from using legacyData to using itemClassData. Not sure if this will fix your problem but can you please update first and confirm whether the problem still exists. The instructions to get the latest version are in the readme file.
Will do thanks
On 26 Jun 2022, at 11:47, Soccerama @.***> wrote:
@darrellberry I think you may not be using the latest version. There was an update on 15 Mar 2021 that moved away from using legacyData to using itemClassData. Not sure if this will fix your problem but can you please update first and confirm whether the problem still exists.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
@darrellberry did that work?
Hi
getAccountStatement crashes at the line
accNewOrders[, fixColNames]
with the error
...if the first page of results contained the column
deadHeatPriceDivisor
but the current page doesn't contain this column. Looks like fixColNames only gets set the first time through the main loop so whatever columns are present on that page, it expects to see on subsequent pages -- but appears the API doesn't include at least that specific column unless statement items on the current page require it -- hence the error.A simple hack is to add
deadHeatPriceDivisor
to the list of columns excluded when the data is pulled in.accNewOrders[, "legacyData"] <- NULL
is already executed... just add
accNewOrders[, "deadHeatPriceDivisor"] <- NULL
I'm not sure if there would be knock-on effects from implementing this as a fix, but it works for me for this specific issue. I would imagine there are other 'special case' columns which would create the same problem so a more general solution would be preferable.