Ask Your Question

Revision history [back]

TypeError: 'sage.rings.integer.Integer' object is not iterable

This is my code:

for i in range(0,10):
lp = 0
lnp = 0
for j in range(0,100):
    N,p,q,d = gen_par(up,down)
    priv, h = keygeneration(N,p,q,d)
    m = randompolyBinary(d)
    e = enc(m, h, d)
    a = dec(e, priv)
    if(m == a):
        lp+=1
    else:
        lnp+=1

When i try to compile it, i have this problem:

    *** WARNING: Code contains non-ascii characters    ***
    Traceback (most recent call last):
    File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1191, in execute
flags=compile_flags), namespace, locals)
        File "", line 5, in <module>
TypeError: 'sage.rings.integer.Integer' object is not iterable

Can someone help me?