WMS-Engineering / AusMap

Proudly maintained by WMS Engineering, AusMap is the essential plugin for Australian QGIS users, providing easy access to free Government datasets and other web services.
http://watermodelling.com.au/tools/ausmap/
8 stars 5 forks source link

Unable to install plugin for QGIS 2.14.18 on Ubuntu 16.04 #2

Closed dobedobedo closed 5 years ago

dobedobedo commented 7 years ago

Hi,

I'm not able to install this plugin on my Ubuntu machine. It shows the following error message:

The plugin is broken. Python said: 2

Could you please check the problem? I use QGIS official repository: http://qgis.org/debian-ltr xenial

Dan-Knott commented 7 years ago

Hi,

I develop in a windows environment currently. I'll setup a Ubuntu virtual machine and check out the issue

anemdr commented 7 years ago

Dan Same story here, cannot install from Plugin Manager. Get message The plugin is broken. Python said: 2

Running on Ubuntu 16.04. QGIS version | 2.18.11 | QGIS code revision | 29548e7 Compiled against Qt | 4.8.7 | Running against Qt | 4.8.7 Compiled against GDAL/OGR | 1.11.3 | Running against GDAL/OGR | 1.11.3 Compiled against GEOS | 3.5.0-CAPI-1.9.0 | Running against GEOS | 3.5.0-CAPI-1.9.0 r4084 PostgreSQL Client Version | 9.5.2 | SpatiaLite Version | 4.3.0a QWT Version | 5.2.3 | PROJ.4 Version | 492 QScintilla2 Version | 2.9.1 |

Dan-Knott commented 7 years ago

When opening qgis or installing the plugin, are you able to see the stack trace. There may be a button in the error message bar and it will have a window. image if you could send em the text there i should be able to find the problem

anemdr commented 7 years ago

Sorry Dan - do not get such an option - just to un or reinstall.

Moult commented 6 years ago

I am able to replicate this issue. @Dan-Knott the detailed error message you are looking for is:

Couldn't load plugin AusMap-master due to an error when calling its classFactory() method

IOError: [Errno 2] No such file or directory: '/home/dion/.qgis2/python/plugins/AusMap-master/aboutAusMapAlternative.ui' 
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/qgis/utils.py", line 333, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/dion/.qgis2/python/plugins/AusMap-master/__init__.py", line 34, in classFactory
    from .aus_map import AusMap
  File "/usr/lib64/python2.7/site-packages/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/dion/.qgis2/python/plugins/AusMap-master/aus_map.py", line 59, in 
    from ausmap_about_alternative import KFAlternativeAboutDialog
  File "/usr/lib64/python2.7/site-packages/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/dion/.qgis2/python/plugins/AusMap-master/ausmap_about_alternative.py", line 5, in 
    os.path.join(os.path.dirname(__file__), 'aboutAusMapAlternative.ui')
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/__init__.py", line 208, in loadUiType
    winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/Compiler/compiler.py", line 140, in compileUi
    w = self.parse(input_stream, resource_suffix)
  File "/usr/lib64/python2.7/site-packages/PyQt4/uic/uiparser.py", line 1004, in parse
    document = parse(filename)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 647, in parse
    source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '/home/dion/.qgis2/python/plugins/AusMap-master/aboutAusMapAlternative.ui'

Python version: 2.7.14 (default, Feb 18 2018, 20:44:55) [GCC 6.4.0] 
QGIS version: 2.18.14 Las Palmas, exported 

Python Path:
/usr/share/qgis/python
/home/dion/.qgis2/python
/home/dion/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/lib64/python27.zip
/usr/lib64/python2.7
/usr/lib64/python2.7/plat-linux2
/usr/lib64/python2.7/lib-tk
/usr/lib64/python2.7/lib-old
/usr/lib64/python2.7/lib-dynload
/usr/lib64/python2.7/site-packages
/usr/lib64/python2.7/site-packages/gtk-2.0
/home/dion/.qgis2//python

Note that dion is my username.

The reason is due to the file name aboutAusMapAlternative.ui - Linux is case sensitive whereas Windows is not. @Dan-Knott do you mind updating the filename? This fixes the problem on my end.

chrisc1073 commented 5 years ago

Thankyou Moult. When I renamed the file /.qgis2/python/plugins/AusMap-master/aboutAusMapAlternative.ui to include those capital letters it now works a treat ! (.qgis2 is located under my Ubuntu home directory)

anemdr commented 5 years ago

thanks Chris and Moult - this solved it for me too ! now on QGIS 2.18.17 on Ubuntu 18.04.