这是代码
from PIL import ImageGrab
scrgrb = ImageGrab.grabclipboard()
scrgrbnum = 0
def saveimg():
scrgrb.save("screengrab.jpeg + str(scrgrbnum + 1)", "JPEG")
scrgrbnum = scrgrbnum + 1
saveimg()
我得到这个错误
Traceback (most recent call last): File
"C:/Python27/Programs/screengrab", line 10, in <module>
saveimg() File "C:/Python27/Programs/screengrab", line 7, in saveimg
scrgrb.save("screengrab.jpeg + str(scrgrbnum + 1)", "JPEG") AttributeError: 'NoneType' object has no attribute 'save'
为什么我不能保存截屏对象?