天生呀
2021-03-25 22:03
采纳率: 100%
浏览 12.3k
已采纳

'float' object is not subscriptable这要怎么解决呀

Traceback (most recent call last):
  File "C:/Users/Dell/PycharmProjects/banmaxian/预测.py", line 74, in <module>
    draw.text((50.50),'GreenRate:'+str('%.2f')%rate, font=font, fill=(255, 255,255))
  File "F:\Anaconda\lib\site-packages\PIL\ImageDraw.py", line 221, in text
    xy = xy[0] + offset[0], xy[1] + offset[1]
TypeError: 'float' object is not subscriptable

Process finished with exit code 1

6条回答 默认 最新

相关推荐 更多相似问题