chrome run hooks error,create chrome's windows build system error, display UnicodeDecodeError

484 views
Skip to first unread message

Hu Constin

unread,
Dec 2, 2013, 9:03:45 PM12/2/13
to chromi...@chromium.org
I create  chrome build system error! who can help me

run hooks
....
________ running 'D:\depot_tools\python276_bin\python.exe src/build/download_nacl_toolchains.py --no-arm-trusted --keep' in 'D:\trunk'
D:\trunk\src\native_client\toolchain\.tars\toolchain_win_x86.tar.bz2 is already up to date.
win_x86: already up to date.
D:\trunk\src\native_client\toolchain\.tars\naclsdk_win_x86.tgz is already up to date.
win_x86_newlib: already up to date.
D:\trunk\src\native_client\toolchain\.tars\naclsdk_pnacl_win_x86.tgz is already up to date.
pnacl_win_x86: already up to date.
D:\trunk\src\native_client\toolchain\.tars\naclsdk_pnacl_translator.tgz is already up to date.
pnacl_translator: already up to date.

________ running 'D:\depot_tools\python276_bin\python.exe src/build/linux/install-arm-sysroot.py --linux-only' in 'D:\trunk'

________ running 'D:\depot_tools\python276_bin\python.exe src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py --linux-only --arch=amd64' in 'D:\trunk'

________ running 'D:\depot_tools\python276_bin\python.exe src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py --linux-only --arch=i386' in 'D:\trunk'

________ running 'D:\depot_tools\python276_bin\python.exe src/tools/clang/scripts/update.py --mac-only' in 'D:\trunk'

________ running 'D:\depot_tools\python276_bin\python.exe src/build/win/setup_cygwin_mount.py --win-only' in 'D:\trunk'

________ running 'D:\depot_tools\python276_bin\python.exe src/build/util/lastchange.py -o src/build/util/LASTCHANGE' in 'D:\trunk'

________ running 'D:\depot_tools\python276_bin\python.exe src/build/util/lastchange.py -s src/third_party/WebKit -o src/build/util/LASTCHANGE.blink' in 'D:\trunk'

________ running 'download_from_google_storage --no_resume --platform=win32 --no_auth --bucket chromium-gn -s src/tools/gn/bin/win/gn.exe.sha1' in 'D:\trunk'

________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-gn -s src/tools/gn/bin/mac/gn.sha1' in 'D:\trunk'

________ running 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-gn -s src/tools/gn/bin/linux/gn.sha1' in 'D:\trunk'

________ running 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-gn -s src/tools/gn/bin/linux/gn32.sha1' in 'D:\trunk'

________ running 'D:\depot_tools\python276_bin\python.exe src/build/gyp_chromium' in 'D:\trunk'
Enabled Psyco JIT.
Updating projects from gyp files...
Exception: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)
Traceback (most recent call last):
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 472, in CallLoadTargetBuildFile
    includes, depth, check, False)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 388, in LoadTargetBuildFile
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1238, in ProcessVariablesAndConditionsInDict
    build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1253, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1212, in ProcessVariablesAndConditionsInDict
    ProcessConditionsInDict(the_dict, phase, variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1089, in ProcessConditionsInDict
    variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1238, in ProcessVariablesAndConditionsInDict
    build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1253, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1238, in ProcessVariablesAndConditionsInDict
    build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1257, in ProcessVariablesAndConditionsInList
    expanded = ExpandVariables(item, phase, variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 877, in ExpandVariables
    replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
  File "D:\trunk\src\tools\grit\grit_info.py", line 138, in DoMain
    options.target_platform)
  File "D:\trunk\src\tools\grit\grit_info.py", line 81, in Inputs
    node.RunPreSubstitutionGatherer()
  File "D:\trunk\src\tools\grit\grit\node\structure.py", line 229, in RunPreSubstitutionGatherer
    self.gatherer.Parse()
  File "D:\trunk\src\tools\grit\grit\gather\chrome_html.py", line 352, in Parse
    filename_expansion_function=self.filename_expansion_function)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 371, in InlineToString
    filename_expansion_function=filename_expansion_function).inlined_data
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 331, in DoInline
    flat_text)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 330, in <lambda>
    lambda m: InlineCSSFile(m, '<style>%s</style>'),
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 282, in InlineCSSFile
    filepath)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 258, in InlineCSSText
    text = InlineCSSImages(text, filepath)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 294, in InlineCSSImages
    text)
  File "D:\depot_tools\python276_bin\lib\re.py", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 293, in <lambda>
    lambda m: InlineCSSUrls(m, filepath),
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 301, in InlineCSSUrls
    src_match.group(0))
  File "D:\depot_tools\python276_bin\lib\re.py", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 300, in <lambda>
    lambda m: SrcReplace(m, filepath),
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 165, in SrcReplace
    filename_expansion_function=filename_expansion_function)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 112, in SrcInlineAsDataURL
    mimetype = FixupMimeType(mimetypes.guess_type(unicode(filename))[0]) or 'text/plain'
  File "D:\depot_tools\python276_bin\lib\mimetypes.py", line 297, in guess_type
    init()
  File "D:\depot_tools\python276_bin\lib\mimetypes.py", line 358, in init
    db.read_windows_registry()
  File "D:\depot_tools\python276_bin\lib\mimetypError processing node <?xml version="1.0" encoding="UTF-8"?>
<structure file="css/menu.css" flattenhtml="true" name="IDR_WEBUI_CSS_MENU" type="chrome_html" />
Exception: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)
Traceback (most recent call last):
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 472, in CallLoadTargetBuildFile
    includes, depth, check, False)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 388, in LoadTargetBuildFile
    build_file_data, PHASE_EARLY, variables, build_file_path)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1238, in ProcessVariablesAndConditionsInDict
    build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1253, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1238, in ProcessVariablesAndConditionsInDict
    build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1253, in ProcessVariablesAndConditionsInList
    ProcessVariablesAndConditionsInDict(item, phase, variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1238, in ProcessVariablesAndConditionsInDict
    build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 1257, in ProcessVariablesAndConditionsInList
    expanded = ExpandVariables(item, phase, variables, build_file)
  File "D:\trunk\src\tools\gyp\pylib\gyp\input.py", line 877, in ExpandVariables
    replacement = str(py_module.DoMain(parsed_contents[1:])).rstrip()
  File "D:\trunk\src\tools\grit\grit_info.py", line 138, in DoMain
    options.target_platform)
  File "D:\trunk\src\tools\grit\grit_info.py", line 81, in Inputs
    node.RunPreSubstitutionGatherer()
  File "D:\trunk\src\tools\grit\grit\node\structure.py", line 229, in RunPreSubstitutionGatherer
    self.gatherer.Parse()
  File "D:\trunk\src\tools\grit\grit\gather\chrome_html.py", line 352, in Parse
    filename_expansion_function=self.filename_expansion_function)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 371, in InlineToString
    filename_expansion_function=filename_expansion_function).inlined_data
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 346, in DoInline
    flat_text = InlineCSSImages(flat_text)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 294, in InlineCSSImages
    text)
  File "D:\depot_tools\python276_bin\lib\re.py", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 293, in <lambda>
    lambda m: InlineCSSUrls(m, filepath),
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 301, in InlineCSSUrls
    src_match.group(0))
  File "D:\depot_tools\python276_bin\lib\re.py", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 300, in <lambda>
    lambda m: SrcReplace(m, filepath),
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 165, in SrcReplace
    filename_expansion_function=filename_expansion_function)
  File "D:\trunk\src\tools\grit\grit\format\html_inline.py", line 112, in SrcInlineAsDataURL
    mimetype = FixupMimeType(mimetypes.guess_type(unicode(filename))[0]) or 'text/plain'
  File "D:\depot_tools\python276_bin\lib\mimetypes.py", line 297, in guess_type
    init()
  File "D:\depot_tools\python276_bin\lib\mimetypes.py", line 358, in init
    db.read_windows_registry()
  File "D:\depot_tools\python276_bin\lib\mimetypes.py", line 258, in read_windows_registry
    for subkeyname in enum_types(hkcr):
  File "D:\depot_tools\python276_bin\lib\mimetypes.py", line 249, in enum_types
    ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)

Error processing node <?xml version="1.0" encoding="UTF-8"?>
<structure allowexternalscript="true" file="bookmark_manager/main.html" flattenhtml="true" name="IDR_BOOKMARK_MANAGER_MAIN" type="chrome_html" />
es.py", line 258, in read_windows_registry
    for subkeyname in enum_types(hkcr):
  File "D:\depot_tools\python276_bin\lib\mimetypes.py", line 249, in enum_types
    ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb0 in position 1: ordinal not in range(128)

Scott Graham

unread,
Dec 2, 2013, 10:20:13 PM12/2/13
to pah...@gmail.com, Marc-Antoine Ruel, chromium-dev
That looks like a regression in Python 2.7.6, in that it looks like it tries to read mimetypes out of the registry where 2.6 doesn't.

You could probably fix your build by removing some keys from HKEY_CLASSES_ROOT that contain non-ascii characters. If you can identify a key that's causing problems, we should file a bug against Python if that's the cause.

Alternatively, you could try (to revert to the old python for chromium):

set DEPOT_TOOLS_PYTHON_275=0
del d:\depot_tools\python.bat
gclient sync



--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Scott Graham

unread,
Dec 2, 2013, 10:34:43 PM12/2/13
to pah...@gmail.com, Marc-Antoine Ruel, chromium-dev
In fact, there's already a bug: http://bugs.python.org/issue9291

Doesn't appear to be fixed though. It would likely still be helpful to comment there if you can identify they key.


Marc-Antoine Ruel

unread,
Dec 3, 2013, 8:51:00 AM12/3/13
to Scott Graham, pah...@gmail.com, chromium-dev
This is fixed in gclient & git-cl because they import fix_encoding.py, which takes care of fixing the messed up defaults, particularly on Windows. It fixes sys.argv, it fixes the console output locale, it fixes sys.defaultencoding(). Trust me, you don't want to have to code that a second time.

So the best fix is:
- Create third_party/depot_tools/
- Copy fix_encoding.py and add README.chromium.
- Just before calling main(), call fix_encoding.fix_encoding()

M-A



2013/12/2 Scott Graham <sco...@chromium.org>

awk...@gmail.com

unread,
Jan 5, 2014, 7:01:38 AM1/5/14
to chromi...@chromium.org, Scott Graham, pah...@gmail.com
No, the issue is not fixed. I come across exactly the same error today.

张庆龙

unread,
Apr 2, 2014, 11:03:05 PM4/2/14
to chromi...@chromium.org
use python 2.6 is ok

在 2013年12月3日星期二UTC+8上午10时03分45秒,Hu Constin写道:
Reply all
Reply to author
Forward
0 new messages