Closed Mpellet771 closed 1 year ago
You're importing mlbstatsapi
, which is a different package than this one (this package is import statsapi
).
Oh! I apologize for my confusion.Marianne Sent from my iPhoneOn Jun 19, 2023, at 10:06 PM, Todd Roberts @.***> wrote: You're importing mlbstatsapi, which is a different package than this one (this package is import statsapi).
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I'm using the command print('Phillies 40-man roster on opening day of the 2018 season:\n%s' % statsapi.roster(143,'40Man',date=statsapi.get('season',{'seasonId':2018,'sportId':1})['seasons'][0]['regularSeasonStartDate']))
After trying my own code, and I'm getting this error (personal info redacted): Traceback (most recent call last): \Baseball\Python\BaseballScrape.py", line 3, in
import mlbstatsapi
File "AppData\Roaming\Python\Python39\site-packages\mlbstatsapi__init.py", line 1, in
from .mlb_api import Mlb
File "\Roaming\Python\Python39\site-packages\mlbstatsapi\mlb_api.py", line 6, in
from mlbstatsapi.models.people import Person, Player, Coach
File "AppData\Roaming\Python\Python39\site-packages\mlbstatsapi\models\people\ init__.py", line 2, in
from .people import Player, Coach, Person, Batter, Pitcher, DraftPick
File "AppData\Roaming\Python\Python39\site-packages\mlbstatsapi\models\people\people.py", line 163, in
@dataclass(kw_only=True)
TypeError: dataclass() got an unexpected keyword argument 'kw_only'
Is it an installation issue?