evansloan / sports.py

A simple Python package to gather live sports scores
MIT License
60 stars 17 forks source link

No attribute 'get_team_info' #7

Closed TellTej closed 3 years ago

TellTej commented 3 years ago

While running the .py file

import sports

pirates = sports.get_team_info(sports.BASEBALL, 'pirates')
print(pirates.pennants)

penguins = sports.get_team_info(sports.HOCKEY, 'penguins')
print(penguins.points)

steelers = sports.get_team_info(sports.FOOTBALL, 'steelers')
print(steelers.super_bowls)

sixers = sports.get_team_info(sports.BASKETBALL, '76ers')
print(sixers.playoff_app)

I am getting the error

    pirates = sports.get_team_info(sports.BASEBALL, 'pirates')
AttributeError: module 'sports' has no attribute 'get_team_info'

How can I fix this?

evansloan commented 3 years ago

That's my fault, the README file was outdated. Use get_team() instead of get_team_info(). The README has been updated to reflect this change.