python-intercom icon indicating copy to clipboard operation
python-intercom copied to clipboard

The error of type 'None' is not recognized.

Open lukas-gitl opened this issue 7 years ago • 7 comments

The error of type 'None' is not recognized. It occurred with the message: Server Error and http_code: '500'. Please contact Intercom with these details. message: The error of type 'None' is not recognized. It occurred with the message: Server Error and http_code: '500'. Please contact Intercom with these details. context: {'http_code': 500, 'application_error_code': u'server_error'} Traceback (most recent call last): ... File "/usr/local/lib/python2.7/site-packages/intercom/api_operations/save.py", line 14, in create response = self.client.post("/%s/" % (collection), params) File "/usr/local/lib/python2.7/site-packages/intercom/client.py", line 96, in post return self._execute_request(req, params) File "/usr/local/lib/python2.7/site-packages/intercom/client.py", line 84, in _execute_request result = request.execute(self.base_url, self._auth, params) File "/usr/local/lib/python2.7/site-packages/intercom/request.py", line 36, in execute return self.send_request_to_path(base_url, auth, params) File "/usr/local/lib/python2.7/site-packages/intercom/request.py", line 84, in send_request_to_path parsed_body = self.parse_body(resp) File "/usr/local/lib/python2.7/site-packages/intercom/request.py", line 98, in parse_body self.raise_application_errors_on_failure(body, resp.status_code) # noqa File "/usr/local/lib/python2.7/site-packages/intercom/request.py", line 154, in raise_application_errors_on_failure raise error_class(message, error_context) UnexpectedError: The error of type 'None' is not recognized. It occurred with the message: Server Error and http_code: '500'. Please contact Intercom with these details.

lukas-gitl avatar Apr 07 '17 18:04 lukas-gitl

I also have this error with the following code:

from intercom.client import Client
access_token = '<my_access_token>'
return Client(personal_access_token = access_token)

sir-dunxalot avatar Jul 22 '17 02:07 sir-dunxalot

Having difficulties with this too, mainly when trying to update a user and it's company. I get the following:

The error of type 'None' is not recognized. It occurred with the message: Company already exists. and http_code: '400'. Please contact Intercom with these details.

Tried doing this manually with curl, and that succeeded. So something is going wrong here I believe. Note that this is an UnexpectedError.

kerrermanisNL avatar Oct 06 '17 07:10 kerrermanisNL

@lukas-gitl Can you remember how that error was generated? A 500 response indicates an issue on the API side of things.

jkeyes avatar Oct 24 '17 23:10 jkeyes

@sir-dunxalot Do you still have the issue?

jkeyes avatar Oct 24 '17 23:10 jkeyes

@kerrermanisNL That looks like a different issue. Can you raise a new issue and supply some sample code that exhibits the behaviour. Thanks.

jkeyes avatar Oct 24 '17 23:10 jkeyes

@jkeyes Probably. We just stopped caring about errors and just retry and retry and retry and retry ... and eventually let it fail. But usually it eventually succeeds ;)

lukas-gitl avatar Oct 25 '17 22:10 lukas-gitl

@jkeyes Have not used this library recently (because I haven't needed Intercom), sorry.

sir-dunxalot avatar Oct 26 '17 14:10 sir-dunxalot