{"action":"opened","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/9744","labels_url":"https://api.github.com/repos/pydata/pandas/issues/9744/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/9744/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/9744/events","html_url":"https://github.com/pydata/pandas/issues/9744","id":64969065,"number":9744,"title":"BUG: utils.testing.get_locales()","user":{"login":"dstephens99","id":5957850,"avatar_url":"https://avatars.githubusercontent.com/u/5957850?v=3","gravatar_id":"","url":"https://api.github.com/users/dstephens99","html_url":"https://github.com/dstephens99","followers_url":"https://api.github.com/users/dstephens99/followers","following_url":"https://api.github.com/users/dstephens99/following{/other_user}","gists_url":"https://api.github.com/users/dstephens99/gists{/gist_id}","starred_url":"https://api.github.com/users/dstephens99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstephens99/subscriptions","organizations_url":"https://api.github.com/users/dstephens99/orgs","repos_url":"https://api.github.com/users/dstephens99/repos","events_url":"https://api.github.com/users/dstephens99/events{/privacy}","received_events_url":"https://api.github.com/users/dstephens99/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-28T17:42:50Z","updated_at":"2015-03-28T17:42:50Z","closed_at":null,"body":"Line 334: raw_locales = [] deletes the data received from locale_getter, so the return from this function is always a blank list.\r\n\r\n```python\r\n  try:\r\n        raw_locales = locale_getter()\r\n    except:\r\n        return None\r\n\r\n    try:\r\n        # raw_locales is \"\\n\" seperated list of locales\r\n        # it may contain non-decodable parts, so split\r\n        # extract what we can and then rejoin.\r\n        raw_locales = []\r\n        for x in raw_locales:\r\n            try:\r\n                raw_locales.append(str(x, encoding=pd.options.display.encoding))\r\n            except:\r\n                pass\r\n    except TypeError:\r\n        pass\r\n\r\n    if prefix is None:\r\n        return _valid_locales(raw_locales, normalize)\r\n\r\n    found = re.compile('%s.*' % prefix).findall('\\n'.join(raw_locales))\r\n    return _valid_locales(found, normalize)\r\n```\r\nhttps://github.com/pydata/pandas/blob/8d2818e32d0bbb50e183ccb5724c391e4f604670/pandas/util/testing.py#L334"}}