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

相关推荐
青柠视频云9 小时前
青柠视频云——记一次大华摄像头公网语音对讲失败的问题分析
音视频·webrtc·实时音视频·h.265·h.264
加油吧x青年2 天前
Web端开启直播技术方案分享
前端·webrtc·直播
Rookie也要加油2 天前
WebRtc一对一视频通话_New_peer信令处理
笔记·学习·音视频·webrtc
superconvert3 天前
主流流媒体的综合性能大 PK ( smart_rtmpd, srs, zlm, nginx rtmp )
websocket·ffmpeg·webrtc·hevc·rtmp·h264·hls·dash·rtsp·srt·flv
staritstarit6 天前
通过LiveGBS实现安防监控摄像头GB28181转成WebRTC流实现web浏览器网页无插件低延迟直播...
webrtc
JeasonTly6 天前
WebRTC服务器搭建
运维·服务器·webrtc
DogDaoDao6 天前
音视频开发常见的开源项目汇总
ffmpeg·开源·音视频·webrtc·x264·live555·obs
Likeadust11 天前
EasyCVR视频汇聚平台:巧妙解决WebRTC无法播放H.265视频的难题
音视频·webrtc·h.265
LCRxxoo11 天前
Chrome 本地调试webrtc 获取IP是xxx.local
前端·chrome·webrtc