Unexpected error in a notebook

asked 2020-04-24 06:15:12 +0100

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.

edit retag flag offensive close merge delete

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 ( 2020-04-24 07:09:54 +0100 )edit

Thanks I will verify

Cyrille gravatar imageCyrille ( 2020-04-24 15:50:49 +0100 )edit

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

slelievre gravatar imageslelievre ( 2020-04-25 15:28:00 +0100 )edit