-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pynder.errors.RequestError: 400 #193
Comments
Hi, there are new "users" (advertisement) that cause problems. I put serveral methods into try / except blocks to handle the error. Change the pynder code in user.py to something like this and it should work:
|
The error still persists even after making the code change you suggested. `RequestError Traceback (most recent call last) //anaconda3/lib/python3.7/site-packages/cached_property.py in get(self, obj, cls) //anaconda3/lib/python3.7/site-packages/pynder/session.py in profile(self) //anaconda3/lib/python3.7/site-packages/pynder/api.py in profile(self) //anaconda3/lib/python3.7/site-packages/pynder/api.py in _get(self, url) //anaconda3/lib/python3.7/site-packages/pynder/api.py in _request(self, method, url, data) RequestError: 400` Pynder version: 0.0.13 |
Here's the code I used:
`session = pynder.Session(facebook_id=myId, facebook_token=myToken)
list(session.matches())`
Here's the error I got:
Traceback (most recent call last):
File "/Users/jasonkim/PycharmProjects/JynderBot/brainstorming.py", line 8, in
list(session.matches())
File "/Users/jasonkim/PycharmProjects/JynderBot/venv/lib/python3.5/site-packages/pynder/session.py", line 48, in
return (Match(match, self) for match in response if 'person' in match)
File "/Users/jasonkim/PycharmProjects/JynderBot/venv/lib/python3.5/site-packages/pynder/models/user.py", line 135, in init
match['person']['_id'])['results']
File "/Users/jasonkim/PycharmProjects/JynderBot/venv/lib/python3.5/site-packages/pynder/api.py", line 120, in user_info
return self._get("/user/" + user_id)
File "/Users/jasonkim/PycharmProjects/JynderBot/venv/lib/python3.5/site-packages/pynder/api.py", line 52, in _get
return self._request("get", url)
File "/Users/jasonkim/PycharmProjects/JynderBot/venv/lib/python3.5/site-packages/pynder/api.py", line 46, in _request
raise errors.RequestError(result.status_code)
pynder.errors.RequestError: 400
The text was updated successfully, but these errors were encountered: