当前位置:网站首页>【repo】SyntaxError: invalid syntax
【repo】SyntaxError: invalid syntax
2022-08-01 14:58:00 【xigama】
【repo】SyntaxError: invalid syntax
问题描述
Windows10系统上安装git之后,安装repo并进行配置后,为了校验repo是否能够正常使用,在git bash中输入repo后,出现以下问题
$ repo
File "C:\User\****\bin\repo", line 271
except OSError, e:
^
SyntaxError: invalid syntax
原因分析:
提示:这里填写问题的分析:
定位到相关文件的271行之后,查看该区域的提示代码为:
if not os.path.isdir(repodir):
try:
os.mkdir(repodir)
except OSError, e:
print >>sys.stderr, \
'fatal: cannot make %s directory: %s' % (
repodir, e.strerror)
# Don't faise CloneFailure; that would delete the
# name. Instead exit immediately.
# sys.exit(1)
解决方案:
怀疑是python版本问题,解决办法为更换电脑安装的python,将python3版本更换为python2即可解决问题,在安装python2时,记得配置python2的环境变量。
边栏推荐
猜你喜欢
随机推荐
分布式数据库难题(一):数据分区
xmind2testcase:高效的测试用例导出工具
输出0-1背包问题的具体方案 ← 利用二维数组
Next-ViT学习笔记
30分钟成为Contributor|如何多方位参与OpenHarmony开源贡献?
LeetCode50天刷题计划(Day 7—— 字符串转换整数 (atoi) 12.20-15.20)
在网站页脚增加几只戏水的小鱼
Performance Optimization - Animation Optimization Notes
The problem that the column becomes indexed after pd groupby and the aggregation column has no column name
什么是闭包?
c语言rand函数生成随机数,详解C语言生成随机数rand函数的用法[通俗易懂]
荣信文化通过注册:年营收3.8亿 王艺桦夫妇为实控人
预定义和自定义
Longkou united chemical registration: through 550 million revenue xiu-mei li control 92.5% stake
MySQL中的存储过程(详细篇)
向mysql 传数据 这个字符串长度有限制么
qt 通用ui
灵魂发问:MySQL是如何解决幻读的?
kubelet节点压力驱逐
gconf/dconf实战编程(3)利用dconf库读写配置实战以及诸多配套工具演示