python-2.7 - 用 sage 编译会出现“SystemError: new style getargs format but argument is not a tuple”
问题描述
当以下代码用 python 编译时,一切都很好,没有错误,但是当我用 sage 编译时出现错误:“SystemError: new style getargs format but argument is not a tuple” 这是我的代码
from PIL import Image
file=Image.open('/home/mks/Desktop/Shamir_VSIS/si.jpeg')
file2=file.convert("L")
pix = file2.load()
colsize,rowsize=file2.size
for i in range(rowsize):
for j in range(colsize):
if pix[j,i]>250:
pix[j,i]=250
file2.save('/home/mks/Desktop/Shamir_VSIS/si.pgm')
我该如何解决这个问题?
解决方案
推荐阅读
- python - 蟒蛇流行。试图将 pop (删除 list )列为新变量(语言)
- php - 在 vuejs 中显示来自 laravel 的图像
- swift - 如何让我的地图注释打开正确的视图?- 斯威夫特
- python - 在 Python 中,使用 ssl.get_server_certificate 和使用 SSLSocket.getpeercert 有什么区别?
- python - dict 没有对内容进行排序
- php - 根据表中列的计数对表进行颜色编码
- docker - Dockerfile Maven 值
- python - 创建无限字典。这是可能的?
- python - 如何以编程方式下载 Python 中 blob 中引用的 m3u8 视频?
- jquery - Shopify 购物车 API - 将产品添加到购物车而无需变体