{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22044","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22044/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22044/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22044/events","html_url":"https://github.com/tensorflow/tensorflow/pull/22044","id":356674580,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyODcxNzg3","number":22044,"title":"Fix syntax error in single_image_random_dot_stereograms caused by locale","user":{"login":"yongtang","id":6932348,"node_id":"MDQ6VXNlcjY5MzIzNDg=","avatar_url":"https://avatars0.githubusercontent.com/u/6932348?v=4","gravatar_id":"","url":"https://api.github.com/users/yongtang","html_url":"https://github.com/yongtang","followers_url":"https://api.github.com/users/yongtang/followers","following_url":"https://api.github.com/users/yongtang/following{/other_user}","gists_url":"https://api.github.com/users/yongtang/gists{/gist_id}","starred_url":"https://api.github.com/users/yongtang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yongtang/subscriptions","organizations_url":"https://api.github.com/users/yongtang/orgs","repos_url":"https://api.github.com/users/yongtang/repos","events_url":"https://api.github.com/users/yongtang/events{/privacy}","received_events_url":"https://api.github.com/users/yongtang/received_events","type":"User","site_admin":false},"labels":[{"id":300136587,"node_id":"MDU6TGFiZWwzMDAxMzY1ODc=","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"state":"open","locked":false,"assignee":{"login":"martinwicke","id":577277,"node_id":"MDQ6VXNlcjU3NzI3Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/577277?v=4","gravatar_id":"","url":"https://api.github.com/users/martinwicke","html_url":"https://github.com/martinwicke","followers_url":"https://api.github.com/users/martinwicke/followers","following_url":"https://api.github.com/users/martinwicke/following{/other_user}","gists_url":"https://api.github.com/users/martinwicke/gists{/gist_id}","starred_url":"https://api.github.com/users/martinwicke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinwicke/subscriptions","organizations_url":"https://api.github.com/users/martinwicke/orgs","repos_url":"https://api.github.com/users/martinwicke/repos","events_url":"https://api.github.com/users/martinwicke/events{/privacy}","received_events_url":"https://api.github.com/users/martinwicke/received_events","type":"User","site_admin":false},"assignees":[{"login":"martinwicke","id":577277,"node_id":"MDQ6VXNlcjU3NzI3Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/577277?v=4","gravatar_id":"","url":"https://api.github.com/users/martinwicke","html_url":"https://github.com/martinwicke","followers_url":"https://api.github.com/users/martinwicke/followers","following_url":"https://api.github.com/users/martinwicke/following{/other_user}","gists_url":"https://api.github.com/users/martinwicke/gists{/gist_id}","starred_url":"https://api.github.com/users/martinwicke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinwicke/subscriptions","organizations_url":"https://api.github.com/users/martinwicke/orgs","repos_url":"https://api.github.com/users/martinwicke/repos","events_url":"https://api.github.com/users/martinwicke/events{/privacy}","received_events_url":"https://api.github.com/users/martinwicke/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-09-04T06:52:13Z","updated_at":"2018-09-05T21:37:46Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/tensorflow/tensorflow/pulls/22044","html_url":"https://github.com/tensorflow/tensorflow/pull/22044","diff_url":"https://github.com/tensorflow/tensorflow/pull/22044.diff","patch_url":"https://github.com/tensorflow/tensorflow/pull/22044.patch"},"body":"This fix tries to address the issue raised in #21164 where the single_image_random_dot_stereograms in different locale (like de_DE) caused syntax error in python like:\r\n```\r\nFile \"<string>\", line 28\r\n    def single_image_random_dot_stereograms(depth_values, hidden_surface_removal=True, convergence_dots_size=8, dots_per_inch=72, eye_separation=2,5, mu=0,333299994, normalize=True, normalize_max=-100, normalize_min=100, border_level=0, number_colors=256, output_image_shape=[1024, 768, 1], output_data_window=[1022, 757], name=None):\r\n                                                                                                                                      ^\r\nSyntaxError: invalid syntax\r\n```\r\n\r\nThe issue was that the float to string conversion in `python_op_gen_internal.cc` triggered snprintf (in `FloatToBuffer`) which is local dependent and generates something like `eye_separatiion=2,5` in DE locale.\r\n\r\nThis fix replaced the float to string conversion with locale-independent\r\n```\r\n      std::ostringstream s;\r\n      s.imbue(std::locale::classic());\r\n```\r\n\r\nThis fix fixes #21164.\r\n\r\nSigned-off-by: Yong Tang <yong.tang.github@outlook.com>"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/418890039","html_url":"https://github.com/tensorflow/tensorflow/pull/22044#issuecomment-418890039","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/22044","id":418890039,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODg5MDAzOQ==","user":{"login":"yifeif","id":1192265,"node_id":"MDQ6VXNlcjExOTIyNjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1192265?v=4","gravatar_id":"","url":"https://api.github.com/users/yifeif","html_url":"https://github.com/yifeif","followers_url":"https://api.github.com/users/yifeif/followers","following_url":"https://api.github.com/users/yifeif/following{/other_user}","gists_url":"https://api.github.com/users/yifeif/gists{/gist_id}","starred_url":"https://api.github.com/users/yifeif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifeif/subscriptions","organizations_url":"https://api.github.com/users/yifeif/orgs","repos_url":"https://api.github.com/users/yifeif/repos","events_url":"https://api.github.com/users/yifeif/events{/privacy}","received_events_url":"https://api.github.com/users/yifeif/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T21:37:46Z","updated_at":"2018-09-05T21:37:46Z","author_association":"MEMBER","body":"We are using 3.9 with -style=google in `Experimental clang-format Check`. We can add this information to the failure log in addition to the diff. @martinwicke pulling should be okay."}}
{"actor":{"display_login":"yifeif"}}