basketball_reference icon indicating copy to clipboard operation
basketball_reference copied to clipboard

Syntax Error Encoding issue

Open dlman opened this issue 7 years ago • 1 comments

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?

dlman avatar May 15 '17 16:05 dlman

Include # -- coding: utf-8 -- at the top of base.py

From: https://stackoverflow.com/a/24221963

ahwolf avatar Feb 01 '18 13:02 ahwolf