Skip to main content
1 of 2
Donbeo
  • 121
  • 1

The api was working but know I receive an error when I try to run the demo examples. How can I solve?

/usr/bin/python2.7 /home/donbeo/PycharmProjects/stack_overflow/experience.py
StackOverflow user 41981's experience:
Traceback (most recent call last):
  File "/home/donbeo/PycharmProjects/stack_overflow/experience.py", line 13, in <module>
    user = so.user(user_id)
  File "/home/donbeo/Py-StackExchange-master/stackexchange/__init__.py", line 699, in user
    u, = self.users((nid,), **kw)
  File "/home/donbeo/Py-StackExchange-master/stackexchange/__init__.py", line 704, in users
    return self._get(User, ids, 'users', kw)
  File "/home/donbeo/Py-StackExchange-master/stackexchange/__init__.py", line 694, in _get
    return self.build(root, typ, coll, kw)
  File "/home/donbeo/Py-StackExchange-master/stackexchange/__init__.py", line 671, in build
    json = self._request(url, kw)
  File "/home/donbeo/Py-StackExchange-master/stackexchange/__init__.py", line 642, in _request
    json, info = request_mgr.json_request(url, new_params)
  File "/home/donbeo/Py-StackExchange-master/stackexchange/web.py", line 139, in json_request
    req = self.request(to, params)
  File "/home/donbeo/Py-StackExchange-master/stackexchange/web.py", line 111, in request
    conn = req_open.open(request)
  File "/usr/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 448, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 400: Bad Request

Process finished with exit code 1
Donbeo
  • 121
  • 1