Open baseballpractice opened 7 years ago
Hi, thanks for checking out this project!
Are you trying to use it with a public or private league? Unfortunately, ESPN changed their login system a while ago, and I haven't had any time/luck getting through it. Public leagues should work still, but it's possible they've changed how they respond to all requests.
Thanks for replying, it's a very cool project! My league is definitely public. Is the "request-data-from-ESPN" step where the error is coming from?
The error seems to be happening when it's trying to get all the team IDs from the schedule page: http://games.espn.go.com/flb/schedule?leagueId=<YOUR_LEAGUE_ID>&seasonId=2017
. I was able to find a random public league and test against that, and it worked fine, so I'm not sure what's going on.
Could you share which version of Python you're running?
I'm using Python 3.6.1
Could you try changing the version of beautifulsoup4
in requirements.txt to 4.6.0
? Then re-install the dependencies (pip install -r requirements.txt
), and see if that works.
Apparently, bs4 was broken with Python 3.5 until version 4.4.0 was released. I got a different error than you're seeing when I tried, but maybe this will fix it anyway.
It looks like I already had 4.6.0 installed. I went ahead and uninstalled and reinstalled all the components from requirements.txt, and at least this time I got a different error message :)
File "rankings_cli.py", line 192, in
I'm brand new to programming so it's quite possible that the issues I'm having are due to a mistake on my end. That being said, if someone could confirm whether or not the script works for them and hasn't been broken due to a change on ESPN's end that would be amazing!
Here's the error I'm getting:
MyName$ python3 rankings_cli.py Traceback (most recent call last): File "rankings_cli.py", line 192, in <module> main(args) File "rankings_cli.py", line 148, in main rankings = pr.powerRankings() File "/Users/MyName/Downloads/fb-power-rankings-master/fbpowerrankings/power_rankings.py", line 327, in powerRankings oppAwps = self._strengthOfSchedule() File "/Users/MyName/Downloads/fb-power-rankings-master/fbpowerrankings/power_rankings.py", line 283, in _strengthOfSchedule schedule = self._allSchedules() File "/Users/MyName/Downloads/fb-power-rankings-master/fbpowerrankings/power_rankings.py", line 205, in _allSchedules for teamId in self._teamIds(): File "/Users/MyName/Downloads/fb-power-rankings-master/fbpowerrankings/power_rankings.py", line 198, in teamIds teamOptions = soup.find('div', class='bodyCopy').\ AttributeError: 'NoneType' object has no attribute 'find'