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

asked 2018-08-18 01:35:18 -0600

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'/home/mks/Desktop/Shamir_VSIS/si.jpeg')
pix = file2.load()
for i in range(rowsize):
    for j in range(colsize):
        if pix[j,i]>250:

How can I fix this issue?

edit retag flag offensive close merge delete


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

pizza gravatar imagepizza ( 2018-08-18 01:58:30 -0600 )edit

@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. gravatar ( 2018-08-18 09:06:03 -0600 )edit

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?

John Palmieri gravatar imageJohn Palmieri ( 2018-08-20 21:46:37 -0600 )edit

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

John Palmieri gravatar imageJohn Palmieri ( 2018-08-21 22:13:06 -0600 )edit