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

相关推荐
2501_915374354 天前
WebRTC与RTMP
webrtc
_pengliang4 天前
WebRTC 双向视频通话
音视频·webrtc
~央千澈~5 天前
优雅草蜻蜓R实时音视频会议系统云原生私有化部署方案深度解析-优雅草卓伊凡|贝贝|clam|麻子|夜辰
webrtc·实时音视频
~央千澈~8 天前
优雅草蜻蜓T语音会议系统私有化部署方案与RTC技术深度解析-优雅草卓伊凡|clam
webrtc·实时音视频·rtc
old-six-programmer9 天前
NAT 类型及 P2P 穿透
服务器·网络协议·webrtc·p2p·nat
大胡子大叔10 天前
webrtc-streamer视频流播放(rstp协议h264笔记)
笔记·webrtc·rtsp·webrtc-streamer
_可乐无糖10 天前
AWS WebRTC: 判断viewer端拉流是否稳定的算法
linux·服务器·webrtc·aws
却道天凉_好个秋10 天前
WebRTC(十三):信令服务器
webrtc
却道天凉_好个秋20 天前
WebRTC(七):媒体能力协商
webrtc
GetcharZp24 天前
告别“只闻其名”!一文带你深入浅出 WebRTC,并用 Go 搭建你的第一个实时应用
后端·webrtc