Closed ian-shepherd closed 1 year ago
I figured out what was wrong with this. It's the age parameter. The code is sending &age=0,100. The only value that works currently on the FG site is age=0. Anything else results in a 500 error. I've reached out on the Discord channel with more details and asked about how we should proceed since this is a FanGraphs issue.
Also sent an email to Fangraphs support to let them know about their issue.
Fixed and PR created: https://github.com/jldbc/pybaseball/pull/317
Thanks for the incredible detective work and for reaching out to FG, @bryanpeabody. Closing.
from pybaseball import pitching_stats
data = pitching_stats(2021)
returns this error
raise requests.exceptions.HTTPError( requests.exceptions.HTTPError: Error accessing 'https://www.fangraphs.com/leaders.aspx'. Received status code 500