jldbc / pybaseball

Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
MIT License
1.26k stars 333 forks source link

team_batting for 2021 pulling pitching stats #278

Open christopherjluke opened 2 years ago

christopherjluke commented 2 years ago

Wanted to flag that team_batting is pulling pitching stats specifically for 2021. Tested on different years and everything is working. Tried uninstalling pybaseball entirely and still getting this issue.

Screen Shot 2022-07-06 at 11 11 12 PM
happymountains commented 2 years ago

I'm getting the same issue but specifically for 2022 rather than 2021, years before 2021 work fine but 2022 pulls the pitching data. For a workaround, I found that doing team_batting(2022, ind=1) works properly and returns team stats. Not sure why that would fix it though

bdilday commented 2 years ago

This seems like the the same caching issue mentioned here https://github.com/jldbc/pybaseball/issues/267

can you update to v2.2.3 and see if the issue still persists?