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

相关推荐
SendTomo14 小时前
跨设备文件互传新方案
javascript·网络·webrtc·html5·p2p
红尘散仙2 天前
浏览器不能监听端口、没有文件系统,凭什么能点对点传文件?
rust·webrtc·webassembly
福大大架构师每日一题4 天前
mediamtx v1.19.3正式发布:认证安全、WebRTC跨域、MoQ稳定性、RTSP与HLS全面升级
安全·ffmpeg·webrtc
hellojackjiang20114 天前
移动端实时音视频聊天框架 RainbowAV v2.2.7发布
webrtc·实时音视频·即时通讯
淡淡的香烟4 天前
Android中WebRTC通信使用
android·webrtc
SendTomo6 天前
send.wang私传网:P2P直连传大文件首选工具
javascript·网络·网络协议·webrtc·p2p
桑榆4167 天前
WebRTC 本地视频文件推流 Demo 搭建指南 (Ubuntu 24.04)
linux·ubuntu·webrtc
音视频牛哥11 天前
WebRTC 能解决低延迟直播吗?为什么 RTSP、RTMP、GB28181 仍然不可替代?
音视频·webrtc·低延迟rtsp播放器·音视频sdk·smartmediakit·低延迟rtmp播放器·低延迟音视频
云栖梦泽在18 天前
稳如狗网络工具箱:IP、DNS、WebRTC、测速、连通性和全球延迟检测工具简明介绍
网络·网络协议·tcp/ip·网络安全·性能优化·webrtc
用户07806253471920 天前
getUserMedia 权限排障实战:浏览器拒绝,不一定是用户点了“拒绝”
nginx·webrtc