Huh / collar

Utilities for exploring telemetry data
Other
6 stars 9 forks source link

fetch_ats_positions now returning rvest error #72

Closed gavincotterill closed 3 years ago

gavincotterill commented 3 years ago

As of 7/19/2021 code that had been working following the Feb. ATS website change is returning error. If there's a way to create a reprex without divulging account information let me know and I'd be happy to work on that. The issue looks like this:

library(tidyverse); library(collar)

ats_login("ACCOUNTNAME", "ACCOUNTPASS")
cols1 <- c("55555", "55556")
out.acct.1 <- fetch_ats_positions(device_id = cols1)
ats_logout()

The call to fetch_ats_positions() returns the following error:

Error in UseMethod("xml_find_all") : 
  no applicable method for 'xml_find_all' applied to an object of class "raw"

I can manually log into the account and retrieve the positions. I'm not sure if the site changed again recently. Any help would be appreciated. Error occurs on R versions 4.0.x for Mac and Windows with collar 0.0.4.

ericnewkirk commented 3 years ago

Thanks for the nudge, I had fallen behind on syncing updates with the main repo. ATS did in fact change the site again, which causes that function to fail when filtering by collar(s).

I just merged all the updates for the fix - can you try reinstalling with devtools::install_github("huh/collar") or remotes::install_github("huh/collar") and see if it works now?

gavincotterill commented 3 years ago

We're back in business. Thanks so much!!