{"action":"created","issue":{"url":"https://api.github.com/repos/getpelican/pelican/issues/1545","labels_url":"https://api.github.com/repos/getpelican/pelican/issues/1545/labels{/name}","comments_url":"https://api.github.com/repos/getpelican/pelican/issues/1545/comments","events_url":"https://api.github.com/repos/getpelican/pelican/issues/1545/events","html_url":"https://github.com/getpelican/pelican/issues/1545","id":49990262,"number":1545,"title":"UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 7407: character maps to <undefined>","user":{"login":"tchappui","id":2227878,"avatar_url":"https://avatars.githubusercontent.com/u/2227878?v=3","gravatar_id":"","url":"https://api.github.com/users/tchappui","html_url":"https://github.com/tchappui","followers_url":"https://api.github.com/users/tchappui/followers","following_url":"https://api.github.com/users/tchappui/following{/other_user}","gists_url":"https://api.github.com/users/tchappui/gists{/gist_id}","starred_url":"https://api.github.com/users/tchappui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchappui/subscriptions","organizations_url":"https://api.github.com/users/tchappui/orgs","repos_url":"https://api.github.com/users/tchappui/repos","events_url":"https://api.github.com/users/tchappui/events{/privacy}","received_events_url":"https://api.github.com/users/tchappui/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-11-25T08:50:18Z","updated_at":"2015-06-16T11:27:28Z","closed_at":"2015-06-15T22:35:00Z","body":"Hi,\r\n\r\nWhen installating pip on windows 7 with python 3.4, I get the following error (same error as https://github.com/getpelican/pelican/issues/1414):\r\n\r\n```\r\nInstalling collected packages: pelican, python-dateutil, jinja2, docutils, blinker, feedgenerator, unidecode, pytz, six, pygments, markupsafe\r\nCleaning up...\r\nException:\r\nTraceback (most recent call last):\r\n  File \"C:\\Python34\\lib\\site-packages\\pip\\basecommand.py\", line 122, in main\r\n    status = self.run(options, args)\r\n  File \"C:\\Python34\\lib\\site-packages\\pip\\commands\\install.py\", line 283, in run\r\n    requirement_set.install(install_options, global_options, root=options.root_path)\r\n  File \"C:\\Python34\\lib\\site-packages\\pip\\req.py\", line 1435, in install\r\n    requirement.install(install_options, global_options, *args, **kwargs)\r\n  File \"C:\\Python34\\lib\\site-packages\\pip\\req.py\", line 671, in install\r\n    self.move_wheel_files(self.source_dir, root=root)\r\n  File \"C:\\Python34\\lib\\site-packages\\pip\\req.py\", line 901, in move_wheel_files\r\n    pycompile=self.pycompile,\r\n  File \"C:\\Python34\\lib\\site-packages\\pip\\wheel.py\", line 359, in move_wheel_files\r\n    for row in reader:\r\n  File \"C:\\Python34\\lib\\encodings\\cp1250.py\", line 23, in decode\r\n    return codecs.charmap_decode(input,self.errors,decoding_table)[0]\r\nUnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 7407: character maps to     <undefined>\r\n\r\nStoring debug log for failure in C:\\Users\\admin\\pip\\pip.log\r\n```\r\n\r\nIssue 1414 was closed concluding to an encoding bug with pip. I don't think it is the case. Here are my observations:\r\n\r\nI get this error when installing from pip, either locally or from PyPI. Installing from sources does not cause any problem. On windows, the problem already occurs when we build the wheel using setup.py and bdist_wheel. Hence, this is probably not a **pip specific problem**.\r\n\r\nI search for all the files containing a 0x81 byte. All those files are located in the tests or themes directories. Consequently, I tried to rebuild the wheel file without the tests directory and the wheel archive builds and installs correctly. There is an encoding problem in one of the test files and I'm still searching for it.\r\n\r\nThis is a windows specific problem since somewhere during the construction/installation of the wheel, python tries to read a file and supposes it is encoded in cp 1252. However, the 0x81 byte does not mean anything in the 1252 windows encoring. I now have to search for the UTF-8 characters that contain a 0x81 byte in their representation.\r\n\r\nKind regards\r\n\r\nThierry"},"comment":{"url":"https://api.github.com/repos/getpelican/pelican/issues/comments/112390796","html_url":"https://github.com/getpelican/pelican/issues/1545#issuecomment-112390796","issue_url":"https://api.github.com/repos/getpelican/pelican/issues/1545","id":112390796,"user":{"login":"vaibhavsagar","id":1525767,"avatar_url":"https://avatars.githubusercontent.com/u/1525767?v=3","gravatar_id":"","url":"https://api.github.com/users/vaibhavsagar","html_url":"https://github.com/vaibhavsagar","followers_url":"https://api.github.com/users/vaibhavsagar/followers","following_url":"https://api.github.com/users/vaibhavsagar/following{/other_user}","gists_url":"https://api.github.com/users/vaibhavsagar/gists{/gist_id}","starred_url":"https://api.github.com/users/vaibhavsagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaibhavsagar/subscriptions","organizations_url":"https://api.github.com/users/vaibhavsagar/orgs","repos_url":"https://api.github.com/users/vaibhavsagar/repos","events_url":"https://api.github.com/users/vaibhavsagar/events{/privacy}","received_events_url":"https://api.github.com/users/vaibhavsagar/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T11:27:28Z","updated_at":"2015-06-16T11:27:28Z","body":"No luck for me, `pip install --upgrade pelican --no-use-wheel` fails at the very end:\r\n\r\n```\r\n    writing list of installed files to 'C:\\Users\\Vaibhav\\AppData\\Local\\Temp\\pip-al84udr3-record\\install-record.txt'\r\n    Traceback (most recent call last):\r\n      File \"<string>\", line 1, in <module>\r\n      File \"C:\\Users\\Vaibhav\\AppData\\Local\\Temp\\pip-build-pi96qumd\\pelican\\setup.py\", line 48, in <module>\r\n        test_suite='pelican.tests',\r\n      File \"C:\\Python34\\lib\\distutils\\core.py\", line 148, in setup\r\n        dist.run_commands()\r\n      File \"C:\\Python34\\lib\\distutils\\dist.py\", line 955, in run_commands\r\n        self.run_command(cmd)\r\n      File \"C:\\Python34\\lib\\distutils\\dist.py\", line 974, in run_command\r\n        cmd_obj.run()\r\n      File \"C:\\Python34\\lib\\site-packages\\setuptools\\command\\install.py\", line 61, in run\r\n        return orig.install.run(self)\r\n      File \"C:\\Python34\\lib\\distutils\\command\\install.py\", line 566, in run\r\n        self.record)\r\n      File \"C:\\Python34\\lib\\distutils\\cmd.py\", line 336, in execute\r\n        util.execute(func, args, msg, dry_run=self.dry_run)\r\n      File \"C:\\Python34\\lib\\distutils\\util.py\", line 301, in execute\r\n        func(*args)\r\n      File \"C:\\Python34\\lib\\distutils\\file_util.py\", line 228, in write_file\r\n        f.write(line + \"\\n\")\r\n      File \"C:\\Python34\\lib\\encodings\\cp1252.py\", line 19, in encode\r\n        return codecs.charmap_encode(input,self.errors,encoding_table)[0]\r\n    UnicodeEncodeError: 'charmap' codec can't encode character '\\u0301' in position 78: character maps to <undefined>\r\n\r\n    ----------------------------------------\r\n  Rolling back uninstall of pelican\r\nCommand \"C:\\Python34\\python.exe -c \"import setuptools, tokenize;__file__='C:\\\\Users\\\\Vaibhav\\\\AppDat\r\na\\\\Local\\\\Temp\\\\pip-build-pi96qumd\\\\pelican\\\\setup.py';exec(compile(getattr(tokenize, 'open', open)(\r\n__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))\" install --record C:\\Users\\Vaibhav\\AppDat\r\na\\Local\\Temp\\pip-al84udr3-record\\install-record.txt --single-version-externally-managed --compile\" f\r\nailed with error code 1 in C:\\Users\\Vaibhav\\AppData\\Local\\Temp\\pip-build-pi96qumd\\pelican\r\n```"}}