# 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?

Do you find it a must to use sage instead of python?

@pizza This is a part of my whole program. The whole program consists of a system of linear congruence equations which can not be solved by python. I can solve this system of linear congruence equation easily in sage. So I need to use sage.

Can you provide more information? I don't get this error; rather, I get

`IOError: decoder jpeg not available`

. If I use your program on a`png`

file instead, it works just fine. This is with the most recent version of Sage. What version are you using? What line gives the error?I installed

`pillow`

with jpg support and I still don't see the error you mentioned when running this with sage.