运行这段代码时:
#timestamp, capture, and tweet an image
def stamp_cap_tweet():
timestamp = time.strftime("%d%m%Y-%H%M%S")
os.system("fswebcam -r 960x720 -d /dev/video0 " + timestamp + ".jpg") #save image to disk
twit.update_status_with_media(timestamp + ".jpg", status = "@shahidrogers " + timestamp) #tweet image @username
print "Tweeted image at " + timestamp #make a record in the Python output
Run Code Online (Sandbox Code Playgroud)
我收到了错误
文件"tweetpicture.py",第17行
Run Code Online (Sandbox Code Playgroud)os.system("fswebcam -r 960x720 -d /dev/video0 " + timestamp + ".jpg") ^ IndentationError:unindent与任何外部缩进级别都不匹配
这可能意味着什么?我已经四处搜索,人们已经说过有标签和空格的混合,但我完全不理解这一点,因为我还是Python的新手,这是我的前几行编码.
谢谢!
| 归档时间: |
|
| 查看次数: |
23151 次 |
| 最近记录: |