bradleyfay / py-Goldsberry

Python Package for facilitating analysis of NBA Data
MIT License
259 stars 67 forks source link

masterclass.py ObjectManager: get_table_from_data vs. _get_table_from_data #29

Closed Irob466 closed 1 year ago

Irob466 commented 5 years ago

I installed the latest version of py-goldsberry in a Docker container running jupyter:minimal-notebook and ran into this problem with goldsberry.game.game_list(). It looks like all of the classes in goldsberry/game/_Game2.py use get_table_from_data instead of the function that appears in masterclass.py.

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-23f0eefca570> in <module>
----> 1 games.game_list()

/opt/conda/lib/python3.7/site-packages/goldsberry/game/_Game2.py in game_list(self)
    139 
    140     def game_list(self):
--> 141         return self.object_manager.get_table_from_data(self.object_manager.data_tables, 0)
    142 
    143 

AttributeError: 'ObjectManager' object has no attribute 'get_table_from_data'

https://github.com/bradleyfay/py-Goldsberry/blob/828179f8e4aad910d7a8c58faa12d3ae2c354503/goldsberry/masterclass.py#L70-L78

bradleyfay commented 5 years ago

Hmm,

I merged some code without testing (amateur hour!)

I'm in the process of refactoring to work with Python 3.6+. Should get fixed during that.

If you want to make a PR, Happy to review, test, merge and push a bug fix prior to the relaunch.