russ- / pychallonge

Python bindings for the CHALLONGE! API
http://challonge.com/api
BSD 2-Clause "Simplified" License
49 stars 19 forks source link

Failing test_index_filter_by_created (__main__.TournamentsTestCase) - Python 2.7.14 #14

Closed russellvt closed 6 years ago

russellvt commented 6 years ago

Looks like this test case is failing...

(pychallonge-2.7.14) ~/projects/russell/challonge/pychallonge$ CHALLONGE_USER=russellvt CHALLONGE_KEY=$(cat ../api.key) python ./tests.py
...........EE......
======================================================================
ERROR: test_index_filter_by_created (__main__.TournamentsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests.py", line 65, in test_index_filter_by_created
    created_after=datetime.datetime.now().date() - datetime.timedelta(days=1))
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/tournaments.py", line 6, in index
    return api.fetch_and_parse("GET", "tournaments", **params)
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/api.py", line 79, in fetch_and_parse
    doc = ElementTree.parse(fetch(method, uri, params_prefix, **params))
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/api.py", line 63, in fetch
    response = opener.open(req)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request
ZEDGR commented 6 years ago

Hello @russellvt

As I see it this version of pychallonge is no longer maintained. There are some forks that are currently seems to working OK. This is my fork if you like to check it out https://github.com/ZEDGR/pychal

russellvt commented 6 years ago

Thanks... I've merged your stuff in to mine, and I'll go from there.

ZEDGR commented 6 years ago

I am actively maintain my fork. So if you find any bug or something to improve please make a PR on my repo or mention it and I will fix/implement it.