SOLVED: Animations and "_display has no backend"

Recording this just in case it helps someone else in the future.

I have a function that sometimes I use for animation, and sometimes just to pop up an image.

It had been working great, then suddenly failed with “_display has no backend.”

The reason is that I called Plot.gui() to get an image. But apparently what happens when you call “Animation()” is that it swaps in a different backend (makes sense now). So when you go to get an on-screen display, there isn’t one.

It would be nice if Animation could be updated to forward gui() requests to whatever the backend was before Animation got activated.

Although, as I saw and logged in an earlier message, if you select a backend before calling Animation(), it fails with a world age error.

So in general, I guess this is a quiet suggestion to make Animation play a little better with the other backends when it’s active, so that these errors don’t happen. It would have saved me 2 or 3 hours, at any rate… so hopefully it helps someone else.

1 Like