BergWerkGIS / VoGIS-Profil-Tool

VoGIS-Profil-Tool, Amt der Vorarlberger Landesregierung , Landesamt für Vermessung und Geoinformation
http://vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/start.htm
7 stars 4 forks source link

VoGIS Profil does not work on Archlinux #6

Closed kikislater closed 6 years ago

kikislater commented 8 years ago

Hi,

Since there is an update in matplotlib, VoGIS Profil Tool does not work under Archlinux. Source of changes in matplotlib : http://matplotlib.org/devdocs/api/api_changes.html?highlight=navigationtoolbar2qtagg#remove-navigationtoolbar2qtagg

I found a workaround to get it working: First, there is some error when qgis 2.14 is launching : RuntimeError: the PyQt5.QtCore and PyQt4.QtCore modules both wrap the QObject class In vogisprofiltoolplot.py I added : import matplotlib matplotlib.use("Qt4Agg") #new line

Then I get no error when I re-launch qgis 2.14 but when I tried to use the plugin I've got this error : AttributeError: 'module' object has no attribute 'NavigationToolbar2QTAgg' Which is the error reported above to matplotlib. In vogisprofiltoolplot.py line 106 (line 106 because I add a line above to specify using Qt4), I change NavigationToolbar2QTAgg to NavigationToolbar2QT

And now it works.

Sylvain POULAIN

wilhelmberg commented 8 years ago

@kikislater thanks for investigating and finding a solution, haven't tested with 2.14 yet. This update to matplotlib will hopefully also finally fix a longstanding crash on Windows. But it might take a while till this change makes it into a new VoGIS Profil Tool.

kikislater commented 8 years ago

Ok no problem, I just report it if anyone have the same problem and after a long time when you want to upgrade you have the tips :smiley:

There is the same problem with 2.8. It's not a Qgis problem but a python-maptplotlib problem

haubourg commented 7 years ago

Same error here on ubuntu xenial. Maybe a conditionnal check over Matplotlib version and the correct import following matplotlib version is the way to go? Cheers Régis

kikislater commented 6 years ago

@BergWerkGIS Why not apply Regis @haubourg PR ?

wilhelmberg commented 6 years ago

@kikislater just merged. I haven't looked at this project in a while and totally missed the PR 🙈 🙈 🙈

kikislater commented 6 years ago

Thanks