IHCantabria / THREDDSExplorer

Access and visualization of Meteo-Oceanographic dynamic data with QGIS
GNU General Public License v3.0
18 stars 4 forks source link

Qgis 3.0: Compatibility issues with Qgis 2.X #9

Open HaroldHormaechea opened 6 years ago

HaroldHormaechea commented 6 years ago

Good day,

I'm upgrading THREDDS Explorer for QGIS 3.0 compatibility. Unfortunately, this upgrade will require a second branch to be created for it, as the 3.0 adapted plug-in will not be in any way compatible with QGIS 2.X due to the following:

I've managed to make the UI show up, and some basic functions work, but downloading images is still crashing QGIS (hard). I'll contact you whenever I have a proper version ready to see if you wish to merge it to a new branch in your master project. I recommend this approach, as that way both 2.X and 3.X QGIS compatible plug-ins will remain available as "end branches" or tags instead of just versions.

Have a good day, Harold

marceloandrioni commented 5 years ago

Hello, just wondering if there is any news about the THREDDS Explorer compatibility in QGIS 3 (3.8)? Being able to use all the features of THREDDS and QGIS in the same tool was really helpful to do metocean nowcast/forecast analysis. To this day I never saw a webgis alternative that had all the same possibilities of loading and exploring different datasets (scalar, vector, trajectory, etc).

Thank you.

vegama commented 4 years ago

Hello, we are working in migrate THREDDS Explorer to QGIS 3.4 (long term release), we hope that soon we have news.

Thank you

marceloandrioni commented 4 years ago

Ok, glad to know that the port for QGIS v3.x is a possibility. Thanks.

vegama commented 4 years ago

We have uploaded version 2.0 with compatibility with QGIS 3.x, we have tested in QGIS 3.4 and QGIS 3.8, any bug you find, please, comment us to fix.

Thank you!!

marceloandrioni commented 4 years ago

Hello, thanks for the new version but I think I found a bug (at least when using in linux). I tried the new version (2.0) on QGIS v3.8 but it crashed when opening a THREDDS server. It happened with the three pre-configured servers and with a Unidata one that I added.

My system configuration is: qgis_3 8

QGIS doesn't give a lot of debugging information, I only got:

$ QGIS_DEBUG=9 qgis
using qt5ct plugin
D-Bus global menu: no
D-Bus system tray: no
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::startTimer: Timers cannot be started from another thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
Warning: QObject::setParent: Cannot set parent, new parent is in a different thread
QGIS died on signal 11Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No thread selected
No stack.
gdb returned 0
Aborted (core dumped)

Any idea of what may be the problem?

Thank you very much.

vegama commented 4 years ago

I have fixed several bugs, i have tested in Linux Mint 19.2 and looks work.

marceloandrioni commented 4 years ago

Hello again @vegana, first the good news. Using v2.0.1 and doing some small changes in two files it worked on QGISv3.8.3 in Linux! The changes were:

thredds_explorer_ok

The bad news is that this only worked when reading data from a THREDDS server in localhost. All the attempts to read data from NOAA and Santander Meteorology Group servers failed, with QGIS crashing without any warning/error message. When accessing Unidata (https://thredds.unidata.ucar.edu/thredds) the connection failed with:

2019-10-10T23:39:26     WARNING    Traceback (most recent call last):
              File "/home/eani/.local/share/QGIS/QGIS3/profiles/default/python/plugins/THREDDSExplorer/Visor_UI.py", line 397, in _onMapTreeWidgetItemExpanded
              self.controller.mapDataSet(setToUpdate[0], depth=1)
              File "/home/eani/.local/share/QGIS/QGIS3/profiles/default/python/plugins/THREDDSExplorer/libvisor/VisorController.py", line 156, in mapDataSet
              self.InfoService.fillDataSet(dataSetObject, depth)
              File "/home/eani/.local/share/QGIS/QGIS3/profiles/default/python/plugins/THREDDSExplorer/libvisor/ThreddsMapperGeneric.py", line 482, in fillDataSet
              self._asyncFillDataSet(dataSet, depth)
              File "/home/eani/.local/share/QGIS/QGIS3/profiles/default/python/plugins/THREDDSExplorer/libvisor/ThreddsMapperGeneric.py", line 335, in _asyncFillDataSet
              string = page.read()
             UnboundLocalError: local variable 'page' referenced before assignment

I can access theses server just fine when using a broswer or python, so I don't think a network limitation is the problem.

Thank you.

vegama commented 4 years ago

Pull requests are always welcome, i will try to fix this errors as soon as posible but i first need replicate this bugs because in my Linux Mint machine it looks fine.

Thank you!!!