Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrape function error and warning: rapply(...) 'object' must be a list #54

Open
ssp3nc3r opened this issue Oct 10, 2017 · 0 comments
Open

Comments

@ssp3nc3r
Copy link

When running version 1.8.4 from devtools::install_github("pitchRx", "cpsievert"), the scrape function throws an rapply error midway through this (2017) season's data:

files <- c("inning/inning_hit.xml", "miniscoreboard.xml", "players.xml", "inning/inning_all.xml")
conn <- dbConnect(MySQL(), user = 'root', password = 'root', dbname = 'baseball')
pitchRx::scrape(start = "2017-04-02", end = "2017-10-01", async = T, suffix = files, connect = conn)

...

http://gd2.mlb.com/components/game/mlb/year_2017/month_05/day_30/gid_2017_05_30_atlmlb_anamlb_1/inning/inning_all.xml
Successfully copied atbat table to database connection.
Successfully copied action table to database connection.
Successfully copied pitch table to database connection.
Successfully copied po table to database connection.
Successfully copied runner table to database connection.
Collecting garbage
Performing asynchronous download. Please be patient.
http://gd2.mlb.com/components/game/mlb/year_2017/month_05/day_30/gid_2017_05_30_chnmlb_sdnmlb_1/inning/inning_all.xml

...

http://gd2.mlb.com/components/game/mlb/year_2017/month_06/day_14/gid_2017_06_14_arimlb_detmlb_1/inning/inning_all.xml
http://gd2.mlb.com/components/game/mlb/year_2017/month_06/day_14/gid_2017_06_14_chnmlb_nynmlb_1/inning/inning_all.xml
Error in rapply(docs, function(x) getNodeSet(x, path = xpath), classes = c("XMLInternalDocument",  :
  'object' must be a list
In addition: Warning message:
In strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'default/America/New_York'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant