rocky/python-xdis

RuntimeError: code type passed for version 3.10.5 but we are running version None

ImInTheICU opened this issue · 0 comments

from xdis import marsh

script = """
a=10
b=20
print ('addition =',a+b)
"""
code = compile(script, "script", "exec")
x=marsh.dumps(code)
print(x)

exec(marsh.loads(x))

Returns

RuntimeError: code type passed for version 3.10.5 but we are running version None