|

楼主 |
发表于 2022-3-30 14:30:06
|
显示全部楼层
请输入待转换的图片名称:C:/Users/86188/Desktop/pic.png
Traceback (most recent call last):
File "C:\Users\86188\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\Image.py", line 2957, in open
fp.seek(0)
AttributeError: 'str' object has no attribute 'seek'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\86188\Desktop\love.py", line 36, in <module>
main()
File "C:\Users\86188\Desktop\love.py", line 30, in main
texts = pic2ascii(pic, asciis, zoom, vscale)
File "C:\Users\86188\Desktop\love.py", line 4, in pic2ascii
img = Image.open(pic)
File "C:\Users\86188\AppData\Local\Programs\Python\Python310\lib\site-packages\PIL\Image.py", line 2959, in open
fp = io.BytesIO(fp.read())
AttributeError: 'str' object has no attribute 'read'
|
|