{"action":"closed","issue":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1196","labels_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1196/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1196/comments","events_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1196/events","html_url":"https://github.com/sphinx-doc/testing2/issues/1196","id":53295552,"number":1196,"title":"Encoding clash when reading sources","user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-03T06:05:36Z","updated_at":"2015-01-03T06:05:37Z","closed_at":"2015-01-03T06:05:37Z","body":"When building Sphinx documentation on the Launchpad buildds for Ubuntu Raring, I'm getting the following error:\n\n\n```\n#!text\nreading sources... \u001B[  6&#37;] \u001B                      \nTraceback (most recent call last):\n  File \"/usr/lib/python3/dist-packages/sphinx/environment.py\", line 810, in read_doc\n    pub.publish()\n  File \"/usr/lib/python3/dist-packages/docutils/core.py\", line 217, in publish\n    self.settings)\n  File \"/usr/lib/python3/dist-packages/docutils/readers/__init__.py\", line 72, in read\n    self.parse()\n  File \"/usr/lib/python3/dist-packages/docutils/readers/__init__.py\", line 78, in parse\n    self.parser.parse(self.input, document)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/__init__.py\", line 172, in parse\n    self.statemachine.run(inputlines, document, inliner=self.inliner)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 174, in run\n    input_source=document['source'])\n  File \"/usr/lib/python3/dist-packages/docutils/statemachine.py\", line 239, in run\n    context, state, transitions)\n  File \"/usr/lib/python3/dist-packages/docutils/statemachine.py\", line 460, in check_line\n    return method(match, context, next_state)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 2727, in underline\n    self.section(title, source, style, lineno - 1, messages)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 331, in section\n    self.new_subsection(title, lineno, messages)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 399, in new_subsection\n    node=section_node, match_titles=True)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 286, in nested_parse\n    node=node, match_titles=match_titles)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 199, in run\n    results = StateMachineWS.run(self, input_lines, input_offset)\n  File \"/usr/lib/python3/dist-packages/docutils/statemachine.py\", line 239, in run\n    context, state, transitions)\n  File \"/usr/lib/python3/dist-packages/docutils/statemachine.py\", line 460, in check_line\n    return method(match, context, next_state)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 2300, in explicit_markup\n    nodelist, blank_finish = self.explicit_construct(match)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 2312, in explicit_construct\n    return method(self, expmatch)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 2055, in directive\n    directive_class, match, type_name, option_presets)\n  File \"/usr/lib/python3/dist-packages/docutils/parsers/rst/states.py\", line 2104, in run_directive\n    result = directive_instance.run()\n  File \"/build/buildd/s3ql-beta-2.1/util/sphinx_pipeinclude.py\", line 48, in run\n    handle_io_errors=None)\n  File \"/usr/lib/python3/dist-packages/docutils/io.py\", line 246, in __init__\n    (self.encoding, self.source.encoding))\nUnicodeError: Encoding clash: encoding given is \"utf-8\" but source is opened with encoding \"ANSI_X3.4-1968\".\n```\n\nI have no idea why Sphinx or Python would open anything with this encoding, and I cannot reproduce the problem locally either. I have set LANG=en_US.UTF-8 explicitly for this command, but this didn't change anything. The full build output is available on https://launchpadlibrarian.net/142540817/buildlog_ubuntu-raring-i386.s3ql-beta_2.1-1~raring6_FAILEDTOBUILD.txt.gz and also includes the output of a printenv for debugging. \n\nThe package is built using Sphinx 1.1.3 and Python 3.3.\n\nSorry for not being more specific.. but maybe you still have a hunch what might be causing this?\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/birkenfeld/sphinx/issue/1196\n- Originally reported by: Nikolaus Rath\n- Originally created at: 2013-06-16T05:16:26.750\n"}}