1

I am using QGIS 2.4.0 Chugiak and am trying to create an elevation profile from a raster. When I click on the terrain profile icon I get an error message (see below). Has these problem been encountered before and does anybody know an easy solution to this problem.

An error has occured while executing Python code:

Traceback (most recent call last): File "C:/Users/eesje/.qgis2/python/plugins\profiletool\profileplugin.py", line 299, in changePlotLibrary self.wdg.addPlotWidget(self.plotlibrary) File "C:/Users/eesje/.qgis2/python/plugins\profiletool\ui\ptdockwidget.py", line 145, in addPlotWidget self.plotWdg = PlottingTool().changePlotWidget("Matplotlib", self.frame_for_plot) File "C:/Users/eesje/.qgis2/python/plugins\profiletool\tools\plottingtool.py", line 82, in changePlotWidget from matplotlib.figure import Figure File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\figure.py", line 34, in import matplotlib.colorbar as cbar File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\colorbar.py", line 29, in import matplotlib.collections as collections File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\collections.py", line 23, in import matplotlib.backend_bases as backend_bases File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\backend_bases.py", line 50, in import matplotlib.textpath as textpath File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\textpath.py", line 11, in import matplotlib.font_manager as font_manager File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python\qgis\utils.py", line 454, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 1356, in _rebuild() File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 1341, in _rebuild fontManager = FontManager() File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 1004, in init self.ttflist = createFontList(self.ttffiles) File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\site-packages\matplotlib\font_manager.py", line 584, in createFontList prop = ttfFontProperty(font) File "C:\PROGRA~1\QGISCH~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 0x82 in position 0: ordinal not in range(128)

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

0

The QGIS 2.4.0 that you have is indeed a very old version of QGIS and Terrain profile was updated many times since QGIS 2.4.0. Try to update your QGIS to the current long term release of 2.18.19 (LTR) and use terrain profile. It may solve the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.