Building on Windows fails with a UnicodeDecodeError
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 670
- Forks
- 219
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 1
Description
I tried to build this example on Windows, but ran into an error.
Versions:
- Windows 10 Pro 64bit
- Python 3.6.1 32 bit
- CMake 3.9.1
D:\github>pip install .\cmake_example
Processing o:\github\cmake_example
Installing collected packages: cmake-example
Running setup.py install for cmake-example ... error
Exception:
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 48: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "c:\program files (x86)\python36-32\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "c:\program files (x86)\python36-32\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 48: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\commands\install.py", line 385, in run
requirement_set.cleanup_files()
File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_set.py", line 729, in cleanup_files
req.remove_temporary_source()
File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_install.py", line 977, in remove_temporary_source
rmtree(self.source_dir)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\six.py", line 686, in reraise
raise value
File "c:\program files (x86)\python36-32\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\program files (x86)\python36-32\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
onerror=rmtree_errorhandler)
File "c:\program files (x86)\python36-32\lib\shutil.py", line 494, in rmtree
return _rmtree_unsafe(path, onerror)
File "c:\program files (x86)\python36-32\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\program files (x86)\python36-32\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\program files (x86)\python36-32\lib\shutil.py", line 384, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "c:\program files (x86)\python36-32\lib\shutil.py", line 393, in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())
File "c:\program files (x86)\python36-32\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_errorhandler
func(path)
PermissionError: [WinError 32] Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: 'C:\\Users\\Sysadmin\\AppData\\Local\\Temp\\pip-r3e3669_-build\\build\\temp.win32-3.6\\Release'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No project file or test is named; start by reproducing pip install .\cmake_example on Windows with the reported Python and CMake versions, then trace whether the failure comes from build output decoding or cleanup. Done means the example builds successfully without the UnicodeDecodeError and subsequent permission failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100