{"action":"opened","issue":{"url":"https://api.github.com/repos/twilio/twilio-python/issues/266","repository_url":"https://api.github.com/repos/twilio/twilio-python","labels_url":"https://api.github.com/repos/twilio/twilio-python/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/twilio/twilio-python/issues/266/comments","events_url":"https://api.github.com/repos/twilio/twilio-python/issues/266/events","html_url":"https://github.com/twilio/twilio-python/issues/266","id":153494855,"number":266,"title":"Phone lookup cannot handle spaces.","user":{"login":"christophebiocca","id":566354,"avatar_url":"https://avatars.githubusercontent.com/u/566354?v=3","gravatar_id":"","url":"https://api.github.com/users/christophebiocca","html_url":"https://github.com/christophebiocca","followers_url":"https://api.github.com/users/christophebiocca/followers","following_url":"https://api.github.com/users/christophebiocca/following{/other_user}","gists_url":"https://api.github.com/users/christophebiocca/gists{/gist_id}","starred_url":"https://api.github.com/users/christophebiocca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophebiocca/subscriptions","organizations_url":"https://api.github.com/users/christophebiocca/orgs","repos_url":"https://api.github.com/users/christophebiocca/repos","events_url":"https://api.github.com/users/christophebiocca/events{/privacy}","received_events_url":"https://api.github.com/users/christophebiocca/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-06T17:02:12Z","updated_at":"2016-05-06T17:02:12Z","closed_at":null,"body":"**Version:** 5.4.0\r\n**API Subdomain (api/taskrouter/ip_messaging):** Rest Lookups\r\n\r\n### Code Snippet\r\n```python\r\nfrom twilio.rest.lookups import TwilioLookupsClient\r\nclient = TwilioLookupsClient(account=ACCOUNT_SID, token=AUTH_TOKEN)\r\nclient.phone_numbers.get('(555) 555-5555')\r\n```\r\n\r\n### Exception / Log\r\n```\r\n/python3.5/site-packages/twilio/rest/resources/lookups/phone_numbers.py in get(self, number, include_carrier_info, country_code)\r\n     65         params = transform_params(params)\r\n     66         uri = \"%s/%s\" % (self.uri, number)\r\n---> 67         _, item = self.request(\"GET\", uri, params=params)\r\n     68 \r\n     69         return self.load_instance(item)\r\n\r\n/python3.5/site-packages/twilio/rest/resources/base.py in request(self, method, uri, **kwargs)\r\n    198 \r\n    199         kwargs['use_json_extension'] = self.use_json_extension\r\n--> 200         resp = make_twilio_request(method, uri, auth=self.auth, **kwargs)\r\n    201 \r\n    202         logger.debug(resp.content)\r\n\r\n/python3.5/site-packages/twilio/rest/resources/base.py in make_twilio_request(method, uri, **kwargs)\r\n    162 \r\n    163         raise TwilioRestException(status=resp.status_code, method=method,\r\n--> 164                                   uri=resp.url, msg=message, code=code)\r\n    165 \r\n    166     return resp\r\n\r\nTwilioRestException: \r\nHTTP Error Your request was:\r\n\r\nGET https://lookups.twilio.com/v1/PhoneNumbers/(555) 555-5555?\r\n\r\nTwilio returned the following information:\r\n\r\n```\r\n\r\nThere is no actual information returned.\r\n\r\n### Steps to Reproduce\r\n\r\n1. Try to validate any number with a space in it\r\n2. Weep\r\n\r\n### Culprit Code\r\n\r\nhttps://github.com/twilio/twilio-python/blob/master/twilio/rest/resources/lookups/phone_numbers.py#L66\r\n\r\nPretty sure it needs to escape the number before sending it, but since I don't have access to the server source code I do not know what escaping conventions it expects.\r\n\r\nTesting the [demo](https://www.twilio.com/lookup) works fine so the issue is not likely to be with the server endpoint."}}