Python "win32file" import error this morning

395 views
Skip to first unread message

Bill Ticehurst

unread,
Dec 12, 2019, 2:38:02 PM12/12/19
to v8-dev
I sync'ed to branch-heads/7.9 this morning, did a "gclient sync", and tried to build as usual, and got the below errors shown from the python script re "No module named win32file".

I tried a bunch of stuff, including completely cleaning my V8 enlistment, and completely deleting and redownloading/syncing the "depot_tools" folder per the Chromium instructions, and it still persisted.

In the end, I followed the post at "https://stackoverflow.com/questions/55551188/python-importerror-no-module-named-win32file" and simply ran "python -m pip install pywin32". Now the build is working again.

From running that command, I can see the "win32" packages got added under "C:\src\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\site-packages". Why didn't depot_tools install this if needed? Is there some recent change that caused this (as I've not seen this error before)? I'm not very familiar with the workings of "depot_tools", but can investigate or log an issue elsewhere with some guidance.

 - Bill

C:\src\github\v8>python tools\dev\gm.py x64.debug
# autoninja -C out\x64.debug d8
"C:\src\depot_tools\ninja.exe" -C out\x64.debug d8 -j 10
ninja: Entering directory `out\x64.debug'
[1/1253] COPY ../../third_party/icu/common/icudtl.dat icudtl.dat
FAILED: icudtl.dat
C:/src/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py recursive-mirror ../../third_party/icu/common/
icudtl.dat icudtl.dat
Traceback (most recent call last):
File "../../build/toolchain/win/tool_wrapper.py", line 51, in <module>
import win32file # pylint: disable=import-error
ImportError: No module named win32file

bay...@gmail.com

unread,
Dec 16, 2019, 11:16:12 PM12/16/19
to v8-dev
As you found on Twitter, some context here: https://bugs.chromium.org/p/chromium/issues/detail?id=1033106#c12
Reply all
Reply to author
Forward
0 new messages