basketball_reference
basketball_reference copied to clipboard
Syntax Error Encoding issue
After cloning, installing all the modules from requirements and trying out the first example:
(venv) dl-MacBook-Pro:basketball_reference dl$ python match_generator.py --league nba --seasons 2003-2004
Traceback (most recent call last):
File "match_generator.py", line 7, in <module>
from nba import NbaBRefSeason
File "/Users/dl/nba/basketball_reference/nba.py", line 6, in <module>
from base import BRefMatch, BRefSeason
File "/Users/dl/nba/basketball_reference/base.py", line 78
SyntaxError: Non-ASCII character '\xe2' in file /Users/dl/nba/basketball_reference/base.py on line 78, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Should maybe include encoding at top of base.py?
Include # -- coding: utf-8 -- at the top of base.py
From: https://stackoverflow.com/a/24221963