sportsdataverse / hoopR

An R package to quickly obtain clean and tidy men's basketball play by play data.
http://hoopr.sportsdataverse.org/
Other
81 stars 17 forks source link

Unable to access KenPom data in R #99

Closed Harrisoneller closed 7 months ago

Harrisoneller commented 1 year ago

Describe the bug When using 'login' function, it returns:

Error in read_html.response(x$response, ..., base_url = x$url) : Forbidden (HTTP 403). In addition: Warning message: In session_set_response(x, resp) : Forbidden (HTTP 403).

To Reproduce Steps to reproduce the behavior:

  1. Go to R
  2. load hoopR
  3. try 'login' function with Kenpom credential

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

saiemgilani commented 1 year ago

what version of hoopR are you using? Once you set the KP_USER and KP_PW environment variables and refresh your session, you should not need need any direction interaction with the login function. Please see for reference on how the login function is used: https://hoopr.sportsdataverse.org/reference/kp_user_pw.html

aaronmorrisNC commented 1 year ago

My login information is saved in my .renviron file and I am getting the same error when calling the following function:

login(user_email = Sys.getenv("KP_USER"), user_pw = Sys.getenv("KP_PW"))

Error returned:

Error in read_html.response(x$response, ..., base_url = x$url) : Forbidden (HTTP 403). In addition: Warning message: In session_set_response(x, resp) : Forbidden (HTTP 403).

Deschaine17 commented 1 year ago

I got the same error as aaronmorrisNC

saiemgilani commented 8 months ago

If you're still having issues, please make sure to update your package with:

remotes::install_github('sportsdataverse/hoopR')

then refresh your R session and check again. If issues persist from that point, please holler