Unexpected error in a notebook

asked 4 years ago

Cyrille gravatar image

I have a long notebook which works nicely. And, suddenly, when I call an already defined function I have this error message

unsupported operand parent(s) for -: 'Integer Ring' and '<class 'sage.plot.graphics.graphics'="">'

Could someone help me to understand what happen ? I cannot give the code here it is too hudge because I have tried to do as in Mathematica a self contain notebook.

Preview: (hide)

Comments

1

It says you cannot subtract a graphics object from an integer. Look for subtraction (with -) in the code that gives the error, and check that the values of the variables involved are the ones you expect. Probably you defined a variable, say g, at some point, and you expect it to have this value, but somewhere in between you probably accidentally redefined g to be something else (maybe used it as an index in a loop or something).

rburing gravatar imagerburing ( 4 years ago )

Thanks I will verify

Cyrille gravatar imageCyrille ( 4 years ago )

Hint: in a copy of that notebook, reduce to a minimal example illustrating the problem. Then post the minimal example here.

slelievre gravatar imageslelievre ( 4 years ago )