下载chrome时gclient同步失败

时间:2017-06-01 12:10:58

标签: python webrtc

我在linux和windows中进行gclient同步,并且我在大约15分钟后得到了相同的错误。

Traceback (most recent call last):
  File "/home/jgd/dev/depot_tools/gclient.py", line 2295, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/jgd/dev/depot_tools/gclient.py", line 2281, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/home/jgd/dev/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/home/jgd/dev/depot_tools/gclient.py", line 2030, in CMDsync
    ret = client.RunOnDeps('update', args)
  File "/home/jgd/dev/depot_tools/gclient.py", line 1340, in RunOnDeps
    work_queue.flush(revision_overrides, command, args, options=self._options)
  File "/home/jgd/dev/depot_tools/gclient_utils.py", line 1047, in run
    self.item.run(*self.args, **self.kwargs)
  File "/home/jgd/dev/depot_tools/gclient.py", line 766, in run
    self.ParseDepsFile()
  File "/home/jgd/dev/depot_tools/gclient.py", line 562, in ParseDepsFile
    gclient_eval.Check(deps_content, filepath, global_scope, local_scope)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 240, in Check
    result_scope = _gclient_exec(content, global_scope, filename=path)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 185, in _gclient_exec
    _visit_in_module(stmt)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 169, in _visit_in_module
    value = _gclient_eval(node.value, global_scope, filename=filename)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 146, in _gclient_eval
    return _convert(node_or_string)
  File "/home/jgd/dev/depot_tools/gclient_eval.py", line 145, in _convert
    getattr(node, 'lineno', '<unknown>')))
ValueError: unexpected AST node: <_ast.Num object at 0x1cf5d10> Num(n=1) (file '/home/jgd/dev/jgd/webrtc/src/chromium/src/buildtools/DEPS', line 1)
Error: Command '/usr/bin/python -u src/sync_chromium.py --target-revision 316b880c55452eb694a27ba4d1aa9e74ec9ef342' returned non-zero exit status 1 in /home/jgd/dev/jgd/webrtc

两者都是新安装的,我不知道发生了什么,这是第一次发生在我身上。知道有人如何解决它?

编辑:出现在错误跟踪中的DEPS文件如下:

recursion = 1
use_relative_paths = True

vars = {
  "git_url": "https://chromium.googlesource.com",

  "clang_format_rev": "0ed791d1387a3c9146ea6c453c646f3c0fc97784",   # r282136
  "libcxx_revision": "b1ece9c037d879843b0b0f5a2802e1e9d443b75a",    # r256621
  "libcxxabi_revision": "0edb61e2e581758fc4cd4cd09fc588b3fc91a653", # r256323
}

deps = {
  "clang_format/script":
      Var("git_url") + "/chromium/llvm-project/cfe/tools/clang-format.git@" +
      Var("clang_format_rev"),
  "third_party/libc++/trunk":
      Var("git_url") + "/chromium/llvm-project/libcxx.git" + "@" +
      Var("libcxx_revision"),
  "third_party/libc++abi/trunk":
      Var("git_url") + "/chromium/llvm-project/libcxxabi.git" + "@" +
      Var("libcxxabi_revision"),
}

AFAIK这是自动生成的。

2 个答案:

答案 0 :(得分:1)

sync_chromium.py于去年12月被删除,取而代之的是更高效,更小的下载包。我建议您按照https://webrtc.org/native-code/development的说明进行操作,以获得更新的结帐。它应该不太可能出现下载问题。

答案 1 :(得分:0)

这里的问题是使用的Python版本。正如您在命令错误提示中看到的那样,我在Chrome网站上推荐使用的版本不是2.7+。从Python到Python2.7的更改解决了这个问题。