首页 > 解决方案 > 用 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-2.7runtime-errorubuntu-16.04sage

解决方案


推荐阅读