architv / soccer-cli

:soccer: Football scores for hackers. :computer: A command line interface for all the football scores.
MIT License
1.09k stars 220 forks source link

AttributeError: 'Response' object has no attribute 'status_codes' #98

Closed BrettDong closed 7 years ago

BrettDong commented 7 years ago
$ soccer --league=EPL --standings
Traceback (most recent call last):
  File "/usr/local/bin/soccer", line 9, in <module>
    load_entry_point('soccer-cli==0.1.0.0', 'console_scripts', 'soccer')()
  File "/Library/Python/2.7/site-packages/click-6.6-py2.7.egg/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click-6.6-py2.7.egg/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click-6.6-py2.7.egg/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click-6.6-py2.7.egg/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/soccer_cli-0.1.0.0-py2.7.egg/soccer/main.py", line 296, in main
    get_standings(league, writer)
  File "/Library/Python/2.7/site-packages/soccer_cli-0.1.0.0-py2.7.egg/soccer/main.py", line 137, in get_standings
    id=league_id))
  File "/Library/Python/2.7/site-packages/soccer_cli-0.1.0.0-py2.7.egg/soccer/main.py", line 93, in _get
    if req.status_codes == requests.codes.too_many_requests:
AttributeError: 'Response' object has no attribute 'status_codes'
andyg7 commented 7 years ago

Ya there was a bug in main.py code. This should been fixed now :)

dfrt82 commented 7 years ago

So it is ;)