amosbastian / understat

An asynchronous Python package for https://understat.com/.
MIT License
157 stars 30 forks source link

Example in the readme is not working #3

Closed cyd3r closed 5 years ago

cyd3r commented 5 years ago

The example in the readme is not updated and still uses the get_players method which is not available anymore in the master branch.

Steps to reproduce:

I get the following error:

Traceback (most recent call last):
  File "test.py", line 18, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "test.py", line 12, in main
    data = await understat.get_players("epl", 2019, {"team_title": "Manchester United"})
AttributeError: 'Understat' object has no attribute 'get_players'

Works fine with version 0.1.0 though

amosbastian commented 5 years ago

Fixed the example, thanks!