{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/13363","repository_url":"https://api.github.com/repos/atom/atom","labels_url":"https://api.github.com/repos/atom/atom/issues/13363/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/13363/comments","events_url":"https://api.github.com/repos/atom/atom/issues/13363/events","html_url":"https://github.com/atom/atom/issues/13363","id":192657028,"number":13363,"title":"Possible internal python unicode issue ","user":{"login":"MrYann","id":7197949,"avatar_url":"https://avatars.githubusercontent.com/u/7197949?v=3","gravatar_id":"","url":"https://api.github.com/users/MrYann","html_url":"https://github.com/MrYann","followers_url":"https://api.github.com/users/MrYann/followers","following_url":"https://api.github.com/users/MrYann/following{/other_user}","gists_url":"https://api.github.com/users/MrYann/gists{/gist_id}","starred_url":"https://api.github.com/users/MrYann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrYann/subscriptions","organizations_url":"https://api.github.com/users/MrYann/orgs","repos_url":"https://api.github.com/users/MrYann/repos","events_url":"https://api.github.com/users/MrYann/events{/privacy}","received_events_url":"https://api.github.com/users/MrYann/received_events","type":"User","site_admin":false},"labels":[{"id":228907388,"url":"https://api.github.com/repos/atom/atom/labels/wrong-repo","name":"wrong-repo","color":"e6e6e6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-30T19:30:30Z","updated_at":"2016-12-28T13:07:28Z","closed_at":"2016-12-23T21:05:50Z","body":"### Prerequisites\r\n\r\n* [no - but see below] Can you reproduce the problem in [safe mode](http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode)?\r\n* [yes ] Are you running the [latest version of Atom](http://flight-manual.atom.io/hacking-atom/sections/debugging/#update-to-the-latest-version)?\r\n* [yes ] Did you check the [debugging guide](http://flight-manual.atom.io/hacking-atom/sections/debugging/)?\r\n* [yes] Did you check the [FAQs on Discuss](https://discuss.atom.io/c/faq)?\r\n* [not sure] Are you reporting to the [correct repository](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#atom-and-packages)?\r\n* [yes] Did you [perform a cursory search](https://github.com/issues?q=is%3Aissue+user%3Aatom+-repo%3Aatom%2Felectron) to see if your bug or enhancement is already reported?\r\n\r\n\r\n### Description\r\n\r\nRunning python scripts with unicode characters through \"script\" package or \"build + build-python\" packages results in UnicodeEncodeError, whereas running the same python script in the terminal has no error.\r\n\r\nSo, the problem can obviously no be reproduced in safe mode. However, since two different packages fail in exactly the same way, I would tend to think that this is somehow inherent to atom itself: the unicode environment for python is somehow perturbed when launched through atom.\r\n\r\n\r\n### Steps to Reproduce\r\n\r\n1 Install \"script\" package, or \"build\" and \"build-python\" packages\r\n2 Create new file and paste the following line: \r\nwith open(\"test.txt\", \"w\") as file: file.write(\"é\")\r\n3 execute the script (cmd-i with \"script\" package, or cmd-alt-b with \"build\" package (on Mac -- on linux it seems to be cmd-alt-b in both cases)\r\n\r\n\r\n**Expected behavior:** [What you expected to happen]\r\n\r\nNo error + creation of file \"test.txt\" containing the single letter é\r\n\r\n\r\n**Actual behavior:** [What actually happened]\r\n\r\nUnicodeEncodeError + empty file \"test.txt\"\r\n\r\nEDIT : the same problem happens with SublimeText. So there is something really strange happening\r\n when python scripts are executed from a program instead of in a terminal. But I have no clue auto what.\r\n\r\n### Versions\r\n\r\nAtom 1.12.6\r\nMacOS Sierra\r\nPython 3.5 (anaconda distribution)\r\n"},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/269474624","html_url":"https://github.com/atom/atom/issues/13363#issuecomment-269474624","issue_url":"https://api.github.com/repos/atom/atom/issues/13363","id":269474624,"user":{"login":"MrYann","id":7197949,"avatar_url":"https://avatars.githubusercontent.com/u/7197949?v=3","gravatar_id":"","url":"https://api.github.com/users/MrYann","html_url":"https://github.com/MrYann","followers_url":"https://api.github.com/users/MrYann/followers","following_url":"https://api.github.com/users/MrYann/following{/other_user}","gists_url":"https://api.github.com/users/MrYann/gists{/gist_id}","starred_url":"https://api.github.com/users/MrYann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrYann/subscriptions","organizations_url":"https://api.github.com/users/MrYann/orgs","repos_url":"https://api.github.com/users/MrYann/repos","events_url":"https://api.github.com/users/MrYann/events{/privacy}","received_events_url":"https://api.github.com/users/MrYann/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T13:07:28Z","updated_at":"2016-12-28T13:07:28Z","body":"The thing is that in safe mode, I have no idea whether the locale has been imported or not; since the main effect is that the extensions developed to run code do it in a wrong environment. "}}
{"actor":{"display_login":"MrYann"}}