I am using SageMath version 9.2. I was trying the example in the documentation:
sage: k = GF(2)
sage: k.extension(x^1000 + x^5 + x^4 + x^3 + 1, 'a')
However, this gives the error: UnboundLocalError: local variable 'E' referenced before assignment
How do I fix this?