Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

from matplotlib import animation UnicodeDecodeError #14902

Copy link
Copy link
Closed
@tomdean1939

Description

@tomdean1939
Issue body actions

Bug report

Bug summary

In interactive python3 'from matplotlib import animation' causes an error.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 87: ordinal not in range(128)

Code for reproduction

from matplotlib import animation

Actual outcome


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/animation.py", line 737, in <module>
    class ImageMagickWriter(ImageMagickBase, MovieWriter):
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/animation.py", line 120, in wrapper
    if writerClass.isAvailable():
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/animation.py", line 730, in isAvailable
    return super().isAvailable()
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/animation.py", line 427, in isAvailable
    return shutil.which(cls.bin_path()) is not None
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/animation.py", line 724, in bin_path
    binpath = mpl._get_executable_info('magick').executable
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/__init__.py", line 384, in _get_executable_info
    return impl([path, "--version"], r"^Version: ImageMagick (\S*)")
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/__init__.py", line 324, in impl
    args, stderr=subprocess.STDOUT, universal_newlines=True)
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 425, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "/usr/lib/python3.6/subprocess.py", line 850, in communicate
    stdout = self.stdout.read()
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 87: ordinal not in range(128)

Expected outcome
matplotlib.animation would be imported.

I am not sure it ever worked.

Matplotlib version

  • Operating system: Ubuntu 18.04
  • Matplotlib version: 3.1.1
  • Matplotlib backend (print(matplotlib.get_backend())): GTK3Agg
  • Python version: 3.6.8
  • Jupyter version (if applicable):
  • Other libraries:

Python3 came with the distribution and was updated with apt
matplotlib was installed with python3 -m pip install matplotlib. Updated with pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.