diff --git a/pyfb/client.py b/pyfb/client.py index 18dc327..446d7a0 100755 --- a/pyfb/client.py +++ b/pyfb/client.py @@ -55,8 +55,13 @@ def _make_request(self, url, data=None): """ if not data: data = None + else: + try: + data = data.encode("utf-8") + except: + pass - return urlopen(url, data.encode("utf-8")).read() + return urlopen(url, data).read() def _make_auth_request(self, path, extra_params=None, **data): """