Skip to content

Animation of matplotlib figures not working anymore #1241

@demmerichs

Description

@demmerichs

Summary

Here is a discussion of how to have matplotlib figures inside streamlit be updated to have an animation like character. I recently tested the code provided over there and found that it was not working anymore with the most recent streamlit version.

Steps to reproduce

Take the gist from the above mentioned discussion and run it with different streamlit versions.

Expected behavior:

Expected would be that you see an animated line plot, like it is for streamlit version 0.51.0 (the most recent under which it seems to work for me).

Actual behavior:

For version 0.52.0 I get an error message "Bad message format: Tried to use SessionInfo before it was initialized!" and for versions 0.52.2 and up, there is no error message anymore but an white/empty placeholder for an matplotlib plot (recognizeable by the small zoom errors provided by streamlit).

Is this a regression?

As explained above, this is a regression as it worked in 0.51.0 and before (so the gist was working as the time of writing, of course).

Debug info

  • Streamlit version: tested multiple, see above
  • Python version: 3.7.5
  • Using Conda? PipEnv? PyEnv? Pex?
    Is python -m venv a PipEnv? Anyway, I use venv and pip for installing packages like streamlit and matplotlib.
  • OS version: Ubuntu 19.10
  • Browser version: Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions