ethanluoyc / statsnba-playbyplay

Parsing play-by-play data from stats.nba.com
MIT License
48 stars 12 forks source link

ImportError: No module named models #1

Closed Jonathan-LeRoux closed 6 years ago

Jonathan-LeRoux commented 7 years ago

Hi,

I've been using your code to do some analysis of game logs, and I've found it very useful. I installed the module through pip, and was able to get it to work, but I had to comment out the following line in __init__.py: from .models import Game

Best, Jonathan

ethanluoyc commented 7 years ago

@Jonathan-LeRoux Sorry I must have lost track of my email notification. Are you using Python 3 or Python 2? This might be a compatibility problem with Py3's changes in relative imports.

Jonathan-LeRoux commented 7 years ago

I'm using Python 2.7. I don't think it's a problem with compatibility, but with what's included in the module installed by pip. The only files are api.py, utils.py, and __init__.py. The models/ folder is not in there.

ethanluoyc commented 7 years ago

@Jonathan-LeRoux I think those files are present on the develop branch. Can you see if you can checkout that and install as a develop version to see if this is fixed?

To install as a develop version, go to the root directory of the package and run python setup.py develop

Update I have uploaded the version onto pypi. I made a lot of breaking changes so I am not exactly sure if everything runs smoothly right now.