Ask Your Question

Revision history [back]

Error occurs Compiling with sage “SystemError: new style getargs format but argument is not a tuple”

When the following codes are compiling with python everything is good, there is no error, but when I compile with sage it occurs the error : "SystemError: new style getargs format but argument is not a tuple" Here is my code

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')

How can I fix this issue?