Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Sabermetrics.__init__() got an unexpected keyword argument 'fip' When trying to get team stats, pitching, sabermetrics #223

Open
vadefac opened this issue Sep 15, 2024 · 0 comments

Comments

@vadefac
Copy link

vadefac commented Sep 15, 2024

API Call
mlbstatsapi.Mlb().get_team_stats(team_id=116, groups="pitching", stats="sabermetrics")

Return
File "C:\Users\pivir\AppData\Local\Programs\Python\Python311\Lib\site-packages\mlbstatsapi\mlb_api.py", line 2101, in get_team_stats
splits = mlb_module.create_split_data(mlb_data.data['stats'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pivir\AppData\Local\Programs\Python\Python311\Lib\site-packages\mlbstatsapi\mlb_module.py", line 115, in create_split_data
split_data = return_splits(stat['splits'], stat_type, stat_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\pivir\AppData\Local\Programs\Python\Python311\Lib\site-packages\mlbstatsapi\mlb_module.py", line 73, in return_splits
splits.append(obj(**split))
^^^^^^^^^^^^
File "", line 14, in init
File "C:\Users\pivir\AppData\Local\Programs\Python\Python311\Lib\site-packages\mlbstatsapi\models\stats\pitching.py", line 409, in post_init
self.stat = Sabermetrics(**self.stat)
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Sabermetrics.init() got an unexpected keyword argument 'fip'

@vadefac vadefac changed the title TypeError: Sabermetrics.__init__() got an unexpected keyword argument 'fip' When trying to get team stats pitching sabemtrics TypeError: Sabermetrics.__init__() got an unexpected keyword argument 'fip' When trying to get team stats, pitching, sabermetrics Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant