webrtc gclient sync报错问题解决

报错信息

strp_current_url = current_url[:-4] if current_url.endswith(

^^^^^^^^^^^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'endswith'

bash 复制代码
gclient sync

src/base (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Traceback (most recent call last):
  File "/home/lign/depot_tools/metrics.py", line 302, in print_notice_and_exit
    yield
  File "/home/lign/depot_tools/gclient.py", line 4638, in <module>
    sys.exit(main(sys.argv[1:]))
             ^^^^^^^^^^^^^^^^^^
  File "/home/lign/depot_tools/gclient.py", line 4624, in main
    return dispatcher.execute(OptionParser(), argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lign/depot_tools/subcommand.py", line 254, in execute
    return command(parser, args[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lign/depot_tools/gclient.py", line 3977, in CMDsync
    ret = client.RunOnDeps('update', args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lign/depot_tools/gclient.py", line 2436, in RunOnDeps
    work_queue.flush(revision_overrides,
  File "/home/lign/depot_tools/gclient_utils.py", line 1026, in flush
    reraise(e[0], e[1], e[2])
  File "/home/lign/depot_tools/gclient_utils.py", line 53, in reraise
    raise value
  File "/home/lign/depot_tools/gclient_utils.py", line 1105, in run
    self.item.run(*self.args, **self.kwargs)
  File "/home/lign/depot_tools/gclient.py", line 1251, in run
    self._got_revision = self._used_scm.RunCommand(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lign/depot_tools/gclient_scm.py", line 137, in RunCommand
    return getattr(self, command)(options, args, file_list)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lign/depot_tools/gclient_scm.py", line 664, in wrapper
    return_val = f(*args)
                 ^^^^^^^^
  File "/home/lign/depot_tools/gclient_scm.py", line 866, in update
    strp_current_url = current_url[:-4] if current_url.endswith(
                                           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'endswith'

问题原因:参考https://groups.google.com/a/chromium.org/g/chromium-dev/c/7fv7rSr2sbo

的描述,这个问题似乎是由避免静默覆盖 diff.ignoreSubmodules 配置引入的,该配置在 'git config --list -z' 命令中添加了 '--show-scope' 选项,但该选项从 git v2.26 开始受支持,并且该命令在较旧的 git 中会失败。

解决办法:升级git版本,参考https://blog.csdn.net/ypgsh/article/details/120632001

相关推荐
RTC老炮3 天前
webrtc弱网-AlrDetector类源码分析与算法原理
服务器·网络·算法·php·webrtc
不会吃萝卜的兔子4 天前
go webrtc - 2 webrtc重要概念
webrtc
ayaya_mana4 天前
BilldDesk:基于Vue3+WebRTC+Nodejs+Electron的开源远程桌面控制
electron·开源·webrtc
她超甜i5 天前
前端通过后端给的webrtc的链接,在前端展示,并更新实时状态
前端·javascript·webrtc
计算机小手6 天前
高效 P2P 文件传输工具:FileSync 利用 WebRTC 技术实现极速安全传输
经验分享·docker·webrtc·开源软件
AI码上来7 天前
当小智 AI 遇上数字人,我用 WebRTC 打造实时音视频应用
人工智能·webrtc·实时音视频
Antonio9157 天前
【音视频】WebRTC 音视频延时、同步分析以及超低延时优化
音视频·webrtc
RTC老炮8 天前
webrtc弱网-LossBasedBandwidthEstimation类源码分析与算法原理
网络·算法·webrtc
小噔小咚什么东东8 天前
看到了很多次WebRTC,但是你真的需要它吗?
前端·webrtc
Antonio9158 天前
【音视频】WebRTC P2P、SFU 和 MCU 架构
音视频·webrtc·p2p