FantasyFootballAnalytics / FantasyFootballAnalyticsR

R scripts and data files for the Fantasy Football Analytics website
http://fantasyfootballanalytics.net/
447 stars 1.58k forks source link

Invalid Command Name "toplevel" #24

Closed cwall0868 closed 8 years ago

cwall0868 commented 8 years ago

Tried running scrape a few times with no luck.

OS: OSX Using RStudio: 0.99.893 R Version: 3.3.3 Sample Input:

myProjections <- getProjections(scrapeData=runScrape(week = 0, season = 2016, analysts = c(-1, 3, 4, 5, 6, 7, 8, 9, 17, 18, 19, 20, 25, 26, 27), positions = c("QB", "RB", "WR", "TE", "K", "DST", "DL", "LB", "DB")), avgMethod = "robust", leagueScoring = userScoring, vorBaseline, vorType, teams = 12, format = "standard", mflMocks = 1, mflLeagues = 1, adpSources = c("CBS", "ESPN", "FFC", "MFL", "NFL", "Yahoo"))`

Error Returned:

Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : 
  [tcl] invalid command name "toplevel".

I played around with a few options in the config to see if it had something to do with the lack of data available this early, but didn't have any luck getting it to run.

It seems like I was able to sucessfully pull data.

rstudio_player_data_table
isaactpetersen commented 8 years ago

I'm not able to replicate with my Mac. Could you send your userScoring settings, so we can try to replicate? Also, you might try installing the latest version of the tcltk package: install.packages("tcltk")

isaactpetersen commented 8 years ago

I'm closing this issue because we have not heard back in the last 2 weeks. If it's still not fixed, please let us know.

christran21 commented 7 years ago

I just ran into the same issue. I followed your steps from June 19 but the issue was not solved.

myProjections <- getProjections(scrapeData=runScrape(week = 0, season = 2016, analysts = c(-1, 3, 4, 5, 6, 7, 9, 17, 18, 19, 20, 28), positions = c("QB", "RB", "WR", "TE", "K", "DST")), avgMethod = "average", leagueScoring = userScoring, vorBaseline, vorType, teams = 12, format = "standard", mflMocks = -1, mflLeagues = -1, adpSources = NULL) Error: could not find function "getProjections"

isaactpetersen commented 7 years ago

Make sure you've loaded the package with library("ffanalytics"). If that doesn't work, try this: http://fantasyfootballanalytics.net/2016/06/ffanalytics-r-package-fantasy-football-data-analysis.html#comment-17635

cwall0868 commented 7 years ago

i was able to get this working.. you might double check and make sure you have installed/loaded rstudioapi as well..

cbroglie commented 7 years ago

I hit this as well, and restarting my computer fixed it. I had not restarted my computer after installing XQuartz/R/RStudio before trying out this package.