Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error message although writer library is installed #5

Closed
manfred2020 opened this issue May 21, 2020 · 5 comments
Closed

error message although writer library is installed #5

manfred2020 opened this issue May 21, 2020 · 5 comments

Comments

@manfred2020
Copy link

manfred2020 commented May 21, 2020

hello, i wanted to try your interesting library, but i always get an error (animated figure does not show up on screen and i also cannot save figure as gif).

errors (when trying to save figure):

with version 0.1.13 i get "RuntimeError: Ensure that a matplotlib writer library is installed, see https://github.com/JackMcKew/pandas_alive/blob/master/README.md#requirements for more details".

with version 0.1.12 i got "'MovieWriterRegistry' object is not an iterator".

im running pandas-alive on windows 10, python 3.7.7, matplotlib 3.2.1, pandas 1.0.3, Pillow 7.1.2.

@JackMcKew
Copy link
Owner

Hi!

Thank you for raising this.

Currently Pandas-Alive only supports writing to a GIF via imagemagick.

It's in the to-do list to investigate if Pillow will work for GIFs as well.

@JackMcKew JackMcKew reopened this May 21, 2020
@JackMcKew
Copy link
Owner

I cannot get Pillow to generate GIFs.

It just returns Index Error: list index out of range whenever I try to invoke anim.save(filename,writer=Pillow) or anim.save(filename,writer=PillowWriter())

PRs are most definitely welcome if you can make this work, otherwise I have altered Pandas_Alive to state that Pillow is not supported.

In preparation for the next release, you will be able to define your own custom writer.

@manfred2020
Copy link
Author

thanks for the fast reply!

so right now out of these

"Ensure to have one of the supported tooling software installed prior to use!

ffmpeg
ImageMagick
Pillow"

only imagmagick works? or can i save the animated figure with another file format (not gif) when using pillow?

@JackMcKew
Copy link
Owner

Great question!

I'd been planning a new release to make sure that Pillow was explicitly unsupported after my experience yesterday, but I did only try producing GIFs. I'll see if any other file type works first.

@JackMcKew
Copy link
Owner

Pillow doesn't seem to play nice whatever the file type is.

For future readers the error that is being raised each time the Pillow library is specified is:

Exception has occurred: IndexError
list index out of range
  File "C:\Users\jackm\Documents\GitHub\pandas-alive\pandas_alive\_base_chart.py", line 555, in save
    anim.save(filename, fps=self.fps, dpi=self.dpi,writer=self.writer)
  File "C:\Users\jackm\Documents\GitHub\pandas-alive\pandas_alive\plotting.py", line 339, in plot
    line_race.save(verify_filename(filename))
  File "C:\Users\jackm\Documents\GitHub\pandas-alive\playground.py", line 12, in <module>
    covid_df.sum(axis=1).fillna(0).plot_animated(filename='test.mp4',kind='line',period_label={'x':0.1,'y':0.9},enable_progress_bar=True,writer="pillow")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants