简体   繁体   English

AttributeError:'_io.TextIOWrapper'对象没有属性'show'

[英]AttributeError: '_io.TextIOWrapper' object has no attribute 'show'

import PIL.Image
im01 = open('circle.jpg')
im01.show()

This code has not showing the image like I expected it would. 此代码未显示我期望的图像。 Where have I gone wrong? 我哪里出问题了?

You are using the wrong open method. 您使用了错误的打开方法。 It should look like this: 它看起来应该像这样:

from PIL import Image
im01 = Image.open('circle.jpg')
im01.show()

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python-错误-AttributeError:“ _ io.TextIOWrapper”对象没有属性“插入” - Python - Error - AttributeError: '_io.TextIOWrapper' object has no attribute 'insert' AttributeError: '_io.TextIOWrapper' 对象没有 txt 文件的属性 'lower' - AttributeError: '_io.TextIOWrapper' object has no attribute 'lower' for txt file Python问题:AttributeError:'_ io.TextIOWrapper'对象没有属性'split' - Python Issue: AttributeError: '_io.TextIOWrapper' object has no attribute 'split' 错误:AttributeError:'_io.TextIOWrapper'对象没有属性'split' - ERROR: AttributeError: '_io.TextIOWrapper' object has no attribute 'split' AttributeError:'_io.TextIOWrapper'对象没有属性'reader' - AttributeError: '_io.TextIOWrapper' object has no attribute 'reader' AttributeError:'_io.TextIOWrapper'对象没有属性'append' - AttributeError: '_io.TextIOWrapper' object has no attribute 'append' 什么是“AttributeError:'_ it.TextIOWrapper'对象在python中没有属性'replace'”? - What is a “ AttributeError: '_io.TextIOWrapper' object has no attribute 'replace' ” in python? Python-AttributeError:“ _ io.TextIOWrapper”对象没有属性“ append” - Python - AttributeError: '_io.TextIOWrapper' object has no attribute 'append' AttributeError:'_io.TextIOWrapper'对象没有属性'append'吗? - AttributeError: '_io.TextIOWrapper' object has no attribute 'append'? AttributeError:'_ io.TextIOWrapper'对象没有属性'lower' - AttributeError: '_io.TextIOWrapper' object has no attribute 'lower'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM