cpsievert / pitchRx

Tools for scraping MLB Gameday data and Visualizing PITCHf/x
http://cpsievert.github.io/pitchRx/
Other
123 stars 33 forks source link

Error in discover_repository(path) : Error in 'git2r_repository_discover': 'path' must be a character vector of length one with non NA value In addition: There were 50 or more warnings (use warnings() to see the first 50) #65

Open jrbattles opened 5 years ago

jrbattles commented 5 years ago

I installed pitchRx 1.8.4 directly from GitHub repo and am now having a problem with scrape function.

Here is the code `

load libraries

library(devtools) install.packages("ggplot2") install_github("cpsievert/pitchRx") library(ggplot2) library(graphics) library(RColorBrewer) library(pitchRx) ## thank you Carson Sievert!!! library(dplyr)
library(stringr) library(lubridate) library(RSQLite)

scrape data for 02-03APR2018

dat1804 <- scrape(start = "2018-04-02", end = "2018-04-02", suffix = "inning/inning_all.xml") `

and here is the console output.

dat180402 <- scrape(start = "2018-04-02", end = "2018-04-02", suffix = "inning/inning_all.xml") If file names don't print right away, please be patient. grabbing new game IDs http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/epg.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_bosmlb_miamlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_clemlb_anamlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_wasmlb_atlmlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_minmlb_pitmlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_kcamlb_detmlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_slnmlb_milmlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_chnmlb_cinmlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_chamlb_tormlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_balmlb_houmlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_lanmlb_arimlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_texmlb_oakmlb_1/inning/inning_all.xml http://gd2.mlb.com/components/game/mlb/year_2018/month_04/day_02/gid_2018_04_02_colmlb_sdnmlb_1/inning/inning_all.xml Error in discover_repository(path) : Error in 'git2r_repository_discover': 'path' must be a character vector of length one with non NA value In addition: There were 50 or more warnings (use warnings() to see the first 50)

warnings() Warning messages: 1: In normalizePath(path) : path[1]="1": No such file or directory 2: In normalizePath(path) : path[2]="2": No such file or directory 3: In normalizePath(path) : path[3]="3": No such file or directory 4: In normalizePath(path) : path[4]="4": No such file or directory 5: In normalizePath(path) : path[5]="5": No such file or directory 6: In normalizePath(path) : path[6]="6": No such file or directory 7: In normalizePath(path) : path[7]="7": No such file or directory 8: In normalizePath(path) : path[8]="8": No such file or directory 9: In normalizePath(path) : path[9]="9": No such file or directory 10: In normalizePath(path) : path[10]="10": No such file or directory 11: In normalizePath(path) : path[11]="11": No such file or directory 12: In normalizePath(path) : path[12]="12": No such file or directory 13: In normalizePath(path) : path[13]="13": No such file or directory 14: In normalizePath(path) : path[14]="14": No such file or directory 15: In normalizePath(path) : path[15]="15": No such file or directory 16: In normalizePath(path) : path[16]="16": No such file or directory 17: In normalizePath(path) : path[17]="17": No such file or directory 18: In normalizePath(path) : path[18]="18": No such file or directory 19: In normalizePath(path) : path[19]="19": No such file or directory 20: In normalizePath(path) : path[20]="20": No such file or directory 21: In normalizePath(path) : path[21]="21": No such file or directory 22: In normalizePath(path) : path[22]="22": No such file or directory 23: In normalizePath(path) : path[23]="23": No such file or directory 24: In normalizePath(path) : path[24]="24": No such file or directory 25: In normalizePath(path) : path[25]="25": No such file or directory 26: In normalizePath(path) : path[26]="26": No such file or directory 27: In normalizePath(path) : path[27]="27": No such file or directory 28: In normalizePath(path) : path[28]="28": No such file or directory 29: In normalizePath(path) : path[29]="29": No such file or directory 30: In normalizePath(path) : path[30]="30": No such file or directory 31: In normalizePath(path) : path[31]="31": No such file or directory 32: In normalizePath(path) : path[32]="32": No such file or directory 33: In normalizePath(path) : path[33]="33": No such file or directory 34: In normalizePath(path) : path[34]="34": No such file or directory 35: In normalizePath(path) : path[35]="35": No such file or directory 36: In normalizePath(path) : path[36]="36": No such file or directory 37: In normalizePath(path) : path[37]="37": No such file or directory 38: In normalizePath(path) : path[38]="38": No such file or directory 39: In normalizePath(path) : path[39]="39": No such file or directory 40: In normalizePath(path) : path[40]="40": No such file or directory 41: In normalizePath(path) : path[41]="41": No such file or directory 42: In normalizePath(path) : path[42]="42": No such file or directory 43: In normalizePath(path) : path[43]="43": No such file or directory 44: In normalizePath(path) : path[44]="44": No such file or directory 45: In normalizePath(path) : path[45]="45": No such file or directory 46: In normalizePath(path) : path[46]="46": No such file or directory 47: In normalizePath(path) : path[47]="47": No such file or directory 48: In normalizePath(path) : path[48]="48": No such file or directory 49: In normalizePath(path) : path[49]="49": No such file or directory 50: In normalizePath(path) : path[50]="50": No such file or directory

jrbattles commented 5 years ago

It seems that this error only occurs on MacOS. there is no error when it runs on Windows platform. strange.

avwandle commented 5 years ago

I am currently experiencing this exact same issue on Windows 10 and R 3.5.1. Does anyone know of a solution? Trying to get 2017 and 2018 data into a SQLite database.

goyetc commented 5 years ago

Same issue running MacOS 10.12.4 and RStudio 3.3.2. Appears to be an invalid path structure?

yungwai-chan commented 2 years ago

Hi all, I am not using pitchRx package, but encountered the same issue raised by the OP and google leads me here. I wonder if anyone solve this issue yet? I suspect it is related to setting up 'path'?