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

matplotlib-2.0.0b1 test errors on Windows #6523

Closed
cgohlke opened this issue Jun 1, 2016 · 5 comments
Closed

matplotlib-2.0.0b1 test errors on Windows #6523

cgohlke opened this issue Jun 1, 2016 · 5 comments

Comments

@cgohlke
Copy link
Contributor

cgohlke commented Jun 1, 2016

matplotlib-2.0.0b1 on 64-bit Python 3.5 for Windows errors on two tests.
It looks like updating the rcParams at runtime with the full path to ImageMagick's convert tool no longer has any effect during the tests (it still works outside the tests suite).

======================================================================
ERROR: __main__.test_save_animation_smoketest('imagemagick_file', 'gif')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "X:\Python35\lib\site-packages\matplotlib\testing\decorators.py", line 152, in wrapped_callable
    func(*args, **kwargs)
  File "test_animation.py", line 57, in check_save_animation
    anim.save(F.name, fps=30, writer=writer, bitrate=500)
  File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 838, in save
    writer.grab_frame(**savefig_kwargs)
  File "X:\Python35\lib\contextlib.py", line 66, in __exit__
    next(self.gen)
  File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 202, in saving
    self.finish()
  File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 402, in finish
    + ' Try running with --verbose-debug')
RuntimeError: Error creating movie, return code: 4 Try running with --verbose-debug

======================================================================
ERROR: __main__.test_save_animation_smoketest('imagemagick', 'gif')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 236, in grab_frame
    dpi=self.dpi, **savefig_kwargs)
  File "X:\Python35\lib\site-packages\matplotlib\figure.py", line 1533, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "X:\Python35\lib\site-packages\matplotlib\backend_bases.py", line 2245, in print_figure
    **kwargs)
  File "X:\Python35\lib\site-packages\matplotlib\backends\backend_agg.py", line 508, in print_raw
    fileobj.write(renderer._renderer.buffer_rgba())
OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "X:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
    self.test(*self.arg)
  File "X:\Python35\lib\site-packages\matplotlib\testing\decorators.py", line 152, in wrapped_callable
    func(*args, **kwargs)
  File "test_animation.py", line 57, in check_save_animation
    anim.save(F.name, fps=30, writer=writer, bitrate=500)
  File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 838, in save
    writer.grab_frame(**savefig_kwargs)
  File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 244, in grab_frame
    'with --verbose-debug.'.format(e, out, err))
OSError: Error saving animation to file (cause: [Errno 22] Invalid argument) Stdout: b'' StdError: b'Invalid Parameter - 800x600\r\n'. It may help to re-run with --verbose-debug.

@WeatherGod
Copy link
Member

yeah, the test suite is probably running those tests under the "classic"
mode, and would be completely ignoring the default rcparams (which is a
feature, not a bug, for the most part). Not exactly sure how to fix it.
Perhaps mark as skip on Windows for now?

On Wed, Jun 1, 2016 at 2:48 PM, Christoph Gohlke notifications@github.com
wrote:

matplotlib-2.0.0b1 on 64-bit Python 3.5 for Windows errors on two tests.
It looks like updating the rcParams at runtime
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/animation.py#L667
with the full path to ImageMagick's convert tool no longer has any effect
during the tests (it still works outside the tests suite).

ERROR: main.test_save_animation_smoketest('imagemagick_file', 'gif')

Traceback (most recent call last):
File "X:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
self.test(_self.arg)
File "X:\Python35\lib\site-packages\matplotlib\testing\decorators.py", line 152, in wrapped_callable
func(_args, **kwargs)
File "test_animation.py", line 57, in check_save_animation
anim.save(F.name, fps=30, writer=writer, bitrate=500)
File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 838, in save
writer.grab_frame(**savefig_kwargs)
File "X:\Python35\lib\contextlib.py", line 66, in exit
next(self.gen)
File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 202, in saving
self.finish()
File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 402, in finish
+ ' Try running with --verbose-debug')
RuntimeError: Error creating movie, return code: 4 Try running with --verbose-debug

ERROR: main.test_save_animation_smoketest('imagemagick', 'gif')

Traceback (most recent call last):
File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 236, in grab_frame
dpi=self.dpi, *_savefig_kwargs)
File "X:\Python35\lib\site-packages\matplotlib\figure.py", line 1533, in savefig
self.canvas.print_figure(_args, *_kwargs)
File "X:\Python35\lib\site-packages\matplotlib\backend_bases.py", line 2245, in print_figure
*_kwargs)
File "X:\Python35\lib\site-packages\matplotlib\backends\backend_agg.py", line 508, in print_raw
fileobj.write(renderer._renderer.buffer_rgba())
OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "X:\Python35\lib\site-packages\nose\case.py", line 198, in runTest
self.test(_self.arg)
File "X:\Python35\lib\site-packages\matplotlib\testing\decorators.py", line 152, in wrapped_callable
func(_args, **kwargs)
File "test_animation.py", line 57, in check_save_animation
anim.save(F.name, fps=30, writer=writer, bitrate=500)
File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 838, in save
writer.grab_frame(**savefig_kwargs)
File "X:\Python35\lib\site-packages\matplotlib\animation.py", line 244, in grab_frame
'with --verbose-debug.'.format(e, out, err))
OSError: Error saving animation to file (cause: [Errno 22] Invalid argument) Stdout: b'' StdError: b'Invalid Parameter - 800x600\r\n'. It may help to re-run with --verbose-debug.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#6523, or mute the thread
https://github.com/notifications/unsubscribe/AARy-KBWAiZuHSEOibDM5pDvoEFoyIJUks5qHdQYgaJpZM4Ir3Bv
.

@tacaswell
Copy link
Member

It would be better to just do that rcparams update locally in those tests.

This does point to a possibly larger problem if mpl.style.use blows away this setting.

Are we not installing these external tools on appveyor?

attn @JanSchulz

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Jun 3, 2016
@cgohlke
Copy link
Contributor Author

cgohlke commented Jun 3, 2016

I don't think the AppVeyor setup uses any of the optional requirements such as Pillow, MiKTeX, GhostScript, ffmpeg, avconv, mencoder, ImageMagick, or Inkscape. Over 1000 tests are skipped.

@jankatins
Copy link
Contributor

jankatins commented Jun 3, 2016

Miktex and pillow are on conda-forge which also give us GhostScript, but the rest seems to be not yet packaged :-(

I managed to install ffmpeg from a conda channel (repackaged) and found choco packages for ImageMagick and Inkscape: #6520

@ehfo0
Copy link

ehfo0 commented Jul 18, 2017

how did u fix it?

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

No branches or pull requests

7 participants