{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/12809","repository_url":"https://api.github.com/repos/pydata/pandas","labels_url":"https://api.github.com/repos/pydata/pandas/issues/12809/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/12809/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/12809/events","html_url":"https://github.com/pydata/pandas/issues/12809","id":146142409,"number":12809,"title":"Pandas read_sas error: 'ascii' codec can't decode byte 0xd8 in position 0: ordinal not in range(128)","user":{"login":"randomgambit","id":8282510,"avatar_url":"https://avatars.githubusercontent.com/u/8282510?v=3","gravatar_id":"","url":"https://api.github.com/users/randomgambit","html_url":"https://github.com/randomgambit","followers_url":"https://api.github.com/users/randomgambit/followers","following_url":"https://api.github.com/users/randomgambit/following{/other_user}","gists_url":"https://api.github.com/users/randomgambit/gists{/gist_id}","starred_url":"https://api.github.com/users/randomgambit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randomgambit/subscriptions","organizations_url":"https://api.github.com/users/randomgambit/orgs","repos_url":"https://api.github.com/users/randomgambit/repos","events_url":"https://api.github.com/users/randomgambit/events{/privacy}","received_events_url":"https://api.github.com/users/randomgambit/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/IO%20SAS","name":"IO SAS","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-05T23:54:25Z","updated_at":"2016-04-06T00:37:19Z","closed_at":null,"body":"Hello everybody,\r\n\r\nI am using **Pandas 0.18** to open a `sas7bdat` dataset \r\n\r\nI simply use:\r\n\r\n    df=pd.read_sas('P:/myfile.sas7bdat')\r\n\r\nand I get the following error\r\n\r\n        buf[0:text_block_size].rstrip(b\"\\x00 \").decode())\r\n    \r\n    UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 0: ordinal not in range(128)\r\n\r\nIf I use\r\n\r\n    import sys\r\n    reload(sys)\r\n    sys.setdefaultencoding(\"utf-8\")\r\n\r\nI get\r\n\r\n    UnicodeDecodeError: 'utf8' codec can't decode byte 0xd8 in position 0: invalid continuation byte\r\n\r\nOther `sas7bdat` files in my folder are handled just fine by Pandas. \r\n\r\nWhen I open the file in SAS I see that the column names are very long and span several lines, but otherwise the files look just fine.\r\n\r\nThere are not so many possible options in `read_sas`... what should I do? Is this a bug in `read_sas`? \r\n\r\nMany thanks!\r\n"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/206049799","html_url":"https://github.com/pydata/pandas/issues/12809#issuecomment-206049799","issue_url":"https://api.github.com/repos/pydata/pandas/issues/12809","id":206049799,"user":{"login":"randomgambit","id":8282510,"avatar_url":"https://avatars.githubusercontent.com/u/8282510?v=3","gravatar_id":"","url":"https://api.github.com/users/randomgambit","html_url":"https://github.com/randomgambit","followers_url":"https://api.github.com/users/randomgambit/followers","following_url":"https://api.github.com/users/randomgambit/following{/other_user}","gists_url":"https://api.github.com/users/randomgambit/gists{/gist_id}","starred_url":"https://api.github.com/users/randomgambit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randomgambit/subscriptions","organizations_url":"https://api.github.com/users/randomgambit/orgs","repos_url":"https://api.github.com/users/randomgambit/repos","events_url":"https://api.github.com/users/randomgambit/events{/privacy}","received_events_url":"https://api.github.com/users/randomgambit/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T00:37:19Z","updated_at":"2016-04-06T00:37:19Z","body":"the encoding of my sas file is more precisely latin1 western ISO. Created in linux."}}