0
点赞
收藏
分享

微信扫一扫

Python运行是错误IndentationError: unexpected indent

扶摇_hyber 2023-03-04 阅读 110


在运行Python程序时,报错如下

➜  ~ rosrun beginner_tutorials bird_eyes.py
File "/home/s/ros_study/src/beginner_tutorials/scripts/bird_eyes.py", line 42
cv2.imshow("window_title",im)
^
IndentationError: unexpected indent

这里的 IndentationError: unexpected indent 的意思是说有缩进错误。这段程序是我直接复制的,可能是有这个问题,但是这个问题在gedit编辑器中是看不出来的。最后使用vim查看,果然是不该缩进的地方有缩进。删掉缩进就可以。


举报

相关推荐

0 条评论