{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1432","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1432/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1432/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1432/events","html_url":"https://github.com/tensorflow/tensorflow/issues/1432","id":139299554,"number":1432,"title":"seq2seq tutorial example not working for python 3.4","user":{"login":"OlavHN","id":324645,"avatar_url":"https://avatars.githubusercontent.com/u/324645?v=3","gravatar_id":"","url":"https://api.github.com/users/OlavHN","html_url":"https://github.com/OlavHN","followers_url":"https://api.github.com/users/OlavHN/followers","following_url":"https://api.github.com/users/OlavHN/following{/other_user}","gists_url":"https://api.github.com/users/OlavHN/gists{/gist_id}","starred_url":"https://api.github.com/users/OlavHN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlavHN/subscriptions","organizations_url":"https://api.github.com/users/OlavHN/orgs","repos_url":"https://api.github.com/users/OlavHN/repos","events_url":"https://api.github.com/users/OlavHN/events{/privacy}","received_events_url":"https://api.github.com/users/OlavHN/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-08T15:02:24Z","updated_at":"2016-03-08T19:04:02Z","closed_at":null,"body":"### Environment info\r\nOperating System:\r\nUbuntu 14.04\r\n\r\n1. Which pip package you installed.\r\nsudo pip3 install --upgrade /tmp/pip/tensorflow-*.whl\r\n\r\n2. The output from python -c \"import tensorflow; print(tensorflow.__version__)\".\r\n0.7.1\r\n(Built from commit 263d00d271077 with `TF_UNOFFICIAL_SETTING=1 ./configure` )\r\n\r\n### Steps to reproduce\r\n1. Apply https://github.com/tensorflow/tensorflow/commit/cdd0e2b7c542a59322c054aa1a52b2753c1cf69e \r\n2. Run `python3 ../tensorflow/tensorflow/models/rnn/translate/translate.py --data_dir .`\r\n3. Fail with trying to decode training data as ascii (see log at the end)\r\n\r\n### What have you tried?\r\nModified https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/platform/default/_gfile.py#L63 to `self._fp = open(name, mode, encoding=\"latin-1\")`\r\n\r\nThis seems to fix this issue for python 3.4.\r\n\r\n### Logs or other output that would be helpful\r\nCreating vocabulary ./vocab40000.fr from data ./giga-fren.release2.fr\r\nTraceback (most recent call last):\r\n  File \"../../../tensorflow/tensorflow/models/rnn/translate/translate.py\", line 276, in <module>\r\n    tf.app.run()\r\n  File \"/usr/local/lib/python3.4/dist-packages/tensorflow/python/platform/default/_app.py\", line 30, in run\r\n    sys.exit(main(sys.argv))\r\n  File \"../../../tensorflow/tensorflow/models/rnn/translate/translate.py\", line 273, in main\r\n    train()\r\n  File \"../../../tensorflow/tensorflow/models/rnn/translate/translate.py\", line 137, in train\r\n    FLAGS.data_dir, FLAGS.en_vocab_size, FLAGS.fr_vocab_size)\r\n  File \"/usr/local/lib/python3.4/dist-packages/tensorflow/models/rnn/translate/data_utils.py\", line 268, in prepare_wmt_data\r\n    create_vocabulary(fr_vocab_path, train_path + \".fr\", fr_vocabulary_size)\r\n  File \"/usr/local/lib/python3.4/dist-packages/tensorflow/models/rnn/translate/data_utils.py\", line 136, in create_vocabulary\r\n    for line in f:\r\n  File \"/usr/local/lib/python3.4/dist-packages/tensorflow/python/platform/default/_gfile.py\", line 176, in __next__\r\n    return next(self._fp)\r\n  File \"/usr/lib/python3.4/encodings/ascii.py\", line 26, in decode\r\n    return codecs.ascii_decode(input, self.errors)[0]"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/193917818","html_url":"https://github.com/tensorflow/tensorflow/issues/1432#issuecomment-193917818","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1432","id":193917818,"user":{"login":"girving","id":70511,"avatar_url":"https://avatars.githubusercontent.com/u/70511?v=3","gravatar_id":"","url":"https://api.github.com/users/girving","html_url":"https://github.com/girving","followers_url":"https://api.github.com/users/girving/followers","following_url":"https://api.github.com/users/girving/following{/other_user}","gists_url":"https://api.github.com/users/girving/gists{/gist_id}","starred_url":"https://api.github.com/users/girving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/girving/subscriptions","organizations_url":"https://api.github.com/users/girving/orgs","repos_url":"https://api.github.com/users/girving/repos","events_url":"https://api.github.com/users/girving/events{/privacy}","received_events_url":"https://api.github.com/users/girving/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T19:04:02Z","updated_at":"2016-03-08T19:04:02Z","body":"Next question: what exception are you seeing?  It may just be my eyes glazing over, but it looks like the initial comment has a traceback but not the actual exception."}}