Opened 11 years ago

Closed 4 years ago

#389 closed defect (outdated)

Matplotlib issue causing crash in ProfileTool plugin. "UnicodeDecodeError?: 'ascii' codec can't decode byte 0x8e in position 8: ordinal not in range(128) "

Reported by: nicolascadieux Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords: matplotlib, x86_64
Cc:

Description

Issue #8953 has been updated by Etienne Tourigny:

"This seems to be a matplotlib issue in your osgeo4w install. Does not happen in linux. Please try this in the QGIS python console (which works fine in linux):

from matplotlib.figure import Figure

Traceback (most recent call last):

File "<input>", line 1, in <module> File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 453, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\figure.py", line 34, in <module>

import matplotlib.colorbar as cbar

File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 453, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\colorbar.py", line 29, in <module>

import matplotlib.collections as collections

File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 453, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\collections.py", line 23, in <module>

import matplotlib.backend_bases as backend_bases

File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 453, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\backend_bases.py", line 50, in <module>

import matplotlib.textpath as textpath

File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 453, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\textpath.py", line 11, in <module>

import matplotlib.font_manager as font_manager

File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 453, in _import

mod = _builtin_import(name, globals, locals, fromlist, level)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 1356, in <module>

_rebuild()

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 1341, in _rebuild

fontManager = FontManager()

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 1004, in init

self.ttflist = createFontList(self.ttffiles)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 584, in createFontList

prop = ttfFontProperty(font)

File "C:\OSGEO4~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 398, in ttfFontProperty

sfnt4 = sfnt4.decode('ascii').lower()

UnicodeDecodeError: 'ascii' codec can't decode byte 0x8e in position 8: ordinal not in range(128)

see http://hub.qgis.org/issues/8953

Change History (4)

comment:1 by alexbruy, 11 years ago

Keywords: matplotlib x86_64 added; Matplotlib removed

This only happens if 64-bit build used, 32-bit builds (standalone QGIS and OSGeo4W) works fine.

comment:2 by alexbruy, 11 years ago

Just tested on two other computers with clean 64-bit Windows 7 install and 64-bit OSGeo4W installer. There is no error. Maybe this is depends on some environment settings

comment:3 by joskal, 11 years ago

I just found this is a matplotlib issue: https://github.com/matplotlib/matplotlib/issues/2362

comment:4 by jef, 4 years ago

Resolution: outdated
Status: newclosed
Note: See TracTickets for help on using tickets.