Bug 16557 - python-matplotlib doesn't handle directory with accents
Summary: python-matplotlib doesn't handle directory with accents
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA5-64-OK advisory
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2015-08-08 18:57 CEST by jb butet
Modified: 2015-08-21 20:55 CEST (History)
2 users (show)

See Also:
Source RPM: python-matplotlib
CVE:
Status comment:


Attachments

Description jb butet 2015-08-08 18:57:07 CEST
Description of problem:

python27 raises a UnicodeError when user import matplotlib.pyplot in a directory with accents

 python2.7
Python 2.7.9 (default, Dec 14 2014, 10:12:16) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/matplotlib/__init__.py", line 1048, in <module>
    rcParams = rc_params()
  File "/usr/lib64/python2.7/site-packages/matplotlib/__init__.py", line 897, in rc_params
    fname = matplotlib_fname()
  File "/usr/lib64/python2.7/site-packages/matplotlib/__init__.py", line 748, in matplotlib_fname
    fname = os.path.join(os.getcwd(), 'matplotlibrc')
  File "/usr/lib64/python2.7/posixpath.py", line 80, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)


Version-Release number of selected component (if applicable):
1.4.10

How reproducible:


Steps to Reproduce:
1. mkdir éé
2. cd éé
3. python2.7
4. import matplotlib.pyplot as plt



Reproducible: 

Steps to Reproduce:
David Walser 2015-08-09 22:32:01 CEST

Assignee: bugsquad => makowski.mageia

Comment 1 Philippe Makowski 2015-08-13 19:41:59 CEST
It seems that upstream fixed this in 1.4.1

https://github.com/matplotlib/matplotlib/releases/tag/v1.4.1

Maybe we could update to 1.4.3 that is announced as "This is the last planned bug-fix release in the 1.4 series."
Comment 2 Philippe Makowski 2015-08-13 21:26:06 CEST
Advisory:
========================

Update python-matplotlib to upstream 1.4.3 to fix unicode issues in os path
This is the last planned upstream bug-fix release in the 1.4 series.

References:
https://github.com/matplotlib/matplotlib/releases/tag/v1.4.1
https://github.com/matplotlib/matplotlib/releases/tag/v1.4.2
https://github.com/matplotlib/matplotlib/releases/tag/v1.4.3

Packages in 5/core/updates_testing:
========================

python-matplotlib-gtk3-1.4.3-1.mga5
python3-matplotlib-1.4.3-1.mga5
python-matplotlib-pgf-1.4.3-1.mga5
python3-matplotlib-qt4-1.4.3-1.mga5
python-matplotlib-qt4-1.4.3-1.mga5
python3-matplotlib-tk-1.4.3-1.mga5
python-matplotlib-qt5-1.4.3-1.mga5
python-matplotlib-1.4.3-1.mga5
python-matplotlib-qt-shared-1.4.3-1.mga5
python-matplotlib-cairo-1.4.3-1.mga5
python-matplotlib-svg-1.4.3-1.mga5
python-matplotlib-debuginfo-1.4.3-1.mga5
python-matplotlib-tk-1.4.3-1.mga5
python-matplotlib-doc-1.4.3-1.mga5
python-matplotlib-wx-1.4.3-1.mga5
python-matplotlib-gtk-1.4.3-1.mga5


From :
python-matplotlib-1.4.3-1.mga5

Assignee: makowski.mageia => qa-bugs

Comment 3 Lewis Smith 2015-08-14 21:54:25 CEST
Testing Mageia 5 x64 - OK.

Thanks to jb butet for such good evidence and how to produce it. Merci.

BEFORE update:
python3-matplotlib-tk-1.4.0-10.mga5
python-matplotlib-tk-1.4.0-10.mga5
python3-matplotlib-1.4.0-10.mga5
python-matplotlib-1.4.0-10.mga5
 $ mkdir éé
 $ cd éé
 $ python
 Python 2.7.9 (default, Dec 14 2014, 10:12:16) 
 [GCC 4.9.2] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import matplotlib.pyplot as plt
 Traceback (most recent call last):
... [exactly as Description down to]
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12: ordinal not in range(128)
 >>>

AFTER update:
python3-matplotlib-1.4.3-1.mga5
python-matplotlib-tk-1.4.3-1.mga5
python-matplotlib-1.4.3-1.mga5
python3-matplotlib-tk-1.4.3-1.mga5
[Still in directory éé]
 $ python
 Python 2.7.9 (default, Dec 14 2014, 10:12:16) 
 [GCC 4.9.2] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> 

Clearly the reported fault is fixed.

CC: (none) => lewyssmith
Whiteboard: (none) => MGA5-64-OK

Comment 4 Lewis Smith 2015-08-14 21:58:20 CEST
Missed out the vital python command in the previous AFTER python console:
 >>> import matplotlib.pyplot as plt
 >>>
 >>>
which fortunately preserves the OK verdict!
Comment 5 Samuel Verschelde 2015-08-21 11:29:01 CEST
Validating, thanks Lewis for testing.

Still needs advisory to be uploaded by QA though.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Rémi Verschelde 2015-08-21 16:45:22 CEST

Whiteboard: MGA5-64-OK => MGA5-64-OK advisory

Comment 6 Mageia Robot 2015-08-21 20:55:56 CEST
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0092.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.