Opened 7 years ago

Closed 5 years ago

#1730 closed task (fixed)

QGIS_Plugin_Check WCPS plugin can work with QGIS 3.x

Reported by: Bang Pham Huu Owned by: dkamov
Priority: major Milestone: 9.8
Component: third party Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

Check if Rasdaman's QGIS plugin can work with QGIS 3.x

https://plugins.qgis.org/plugins/QgsWcpsClient1/

from this email

the Release of QGIS 3.0 was a great success and with the first LTR (3.4)
scheduled for release this fall, it is now the perfect time to port your
plugins to the new API, if you did not do it already.
I'd like to share a new tool created to help plugin developers porting
their plugins to QGIS3.
It is called it qgis2to3 and you can install it via pip by running

  pip install qgis2to3 (on some system this might need sudo)

once installed,  two new commands will be available on you system:
- qgis2to3 (a copy of the files found in
https://github.com/qgis/QGIS/tree/master/scripts to allow for quick
downloading and simple installation)
- qgis2apifinder (a tool based on qgis.org/api/api_break.html that helps
you find usages of the QGIS API version 2 and gives hint on how to adapt
the code for API version 3)
Documentation and source code are at
https://github.com/opengisch/qgis2to3
a blog post with more suggestions on how to port can be found here:
http://www.opengis.ch/2018/04/13/porting-qgis-plugins-to-api-v3-strategy-and-tools/

Change History (11)

comment:1 by Dimitar Misev, 7 years ago

First check that the current version (for QGIS 2.x) can work with latest rasdaman.

in reply to:  1 comment:2 by Bang Pham Huu, 7 years ago

Replying to dmisev:

First check that the current version (for QGIS 2.x) can work with latest rasdaman.

https://imgur.com/a/QejWL it can work with latest Petascope and QGIS v2.14

comment:3 by Bang Pham Huu, 7 years ago

Milestone: 9.610.0

However, the latest version QGIS in centos 7 is just 2.14

yum list qgis
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.iphh.net
 * elrepo: ftp.nluug.nl
 * epel: ftp.wrz.de
 * extras: mirror1.hs-esslingen.de
 * updates: mirror.maeh.org
Installed Packages
qgis.x86_64                                                      2.14.9-1.el7                                                       @epel
[rasdaman@localhost rasdaman]$ 

I think to update to version 3.0 should be deferred.

comment:4 by Bang Pham Huu, 7 years ago

Type: defecttask

comment:5 by Bang Pham Huu, 6 years ago

Milestone: 10.09.7
Owner: changed from Bang Pham Huu to dkamov
Status: newassigned

@Dragi: First you need to install QGIS https://qgis.org/en/site/forusers/download.html version 3.2 and then install this WCPS1 plugin: http://rasdaman.org/wiki/Clients#QGISWebGIS to test if it still works, if it is not, update as the ticket description.

comment:6 by dkamov, 6 years ago

On QGIS 3.3 it gives this

This plugin is incompatible with this version of QGIS
Plugin designed for QGIS 2.0 - 2.99

comment:7 by Dimitar Misev, 6 years ago

Right, so the plugin needs to be updated to be compatible with QGIS 3.

comment:8 by dkamov, 6 years ago

After trying to adjust the plugin for QGIS 3 I got to the following error where I didn't know how to continue and so I emailed the QGIS developers team but they didn't contact me back…
The error is:

TypeError: qRegisterResourceData(int, str, str, str): argument 2 has unexpected type 'str' 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 337, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/dkamov/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgsWcpsClient1/__init__.py", line 12, in classFactory
    from .wcps_client import QgsWcpsClient1
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/dkamov/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgsWcpsClient1/wcps_client.py", line 10, in 
    from . import resources_rc
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/dkamov/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgsWcpsClient1/resources_rc.py", line 146, in 
    qInitResources()
  File "/home/dkamov/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QgsWcpsClient1/resources_rc.py", line 141, in qInitResources
    QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
TypeError: qRegisterResourceData(int, str, str, str): argument 2 has unexpected type 'str'

comment:9 by Dimitar Misev, 6 years ago

Owner: changed from dkamov to Bang Pham Huu

comment:10 by Bang Pham Huu, 5 years ago

Milestone: 9.79.8
Owner: changed from Bang Pham Huu to dkamov

So Dragi can continue his task last year.

comment:11 by dkamov, 5 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.