mpetroff / qgsazimuth

Fork of http://sourceforge.net/projects/qgsazimuth/
7 stars 3 forks source link

Error message on attempt to start plugin in QGIS 3.8 #22

Closed fgfletcher closed 4 years ago

fgfletcher commented 4 years ago

QGIS 3.8 running under Mac OS X 10.12.6 Installed plugin successfully however when trying to start it (Plugins > Topography > Azimuth and distance) it immediately generates an error message:

An error has occurred while executing Python code:

TypeError: arguments did not match any overloaded call: move(self, QPoint): argument 1 has unexpected type 'QVariant' move(self, int, int): argument 1 has unexpected type 'QVariant' Traceback (most recent call last): File "/Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgsAzimuth/qgsAzimuth.py", line 192, in run self.loadConf() # get config data File "/Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/qgsAzimuth/qgsAzimuth.py", line 1019, in loadConf self.pluginGui.move(position) TypeError: arguments did not match any overloaded call: move(self, QPoint): argument 1 has unexpected type 'QVariant' move(self, int, int): argument 1 has unexpected type 'QVariant'

Python version: 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] QGIS version: 3.8.0-Zanzibar Zanzibar, exported

Python Path: /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/pdaltools /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/LAStools /Applications/QGIS_3_8_0-1.app/Contents/MacOS/../Resources/python /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS_3_8_0-1.app/Contents/MacOS/../Resources/python/plugins /Library/Frameworks/SQLite3.framework/Versions/E/Python/3.6 /Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6 /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/shapetools/ext-libs /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin /Users/garthfletcher/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/vrtbuilderplugin/vrtbuilder /Users/garthfletcher/GPS MASON/ QGIS PROJECTS

mpetroff commented 4 years ago

What version of Qt is your copy of QGIS built / running against. The version numbers should be accessible from the Help -> About screen.

kylefelipe commented 4 years ago

I have the same issue (#23) on linux DEBIAN STRETCH, Qgis 3.4.11, and some friends had the same using windows...

mpetroff commented 4 years ago

This should be fixed in v0.9.14. See #23 and #24.

brannonvann commented 4 years ago

I'm receiving this same error still on v0.9.14.

mpetroff commented 4 years ago

@brannonvann What version of Qt is your copy of QGIS built / running against. The version numbers should be accessible from the Help -> About screen. What version of QGIS?

brannonvann commented 4 years ago

Hi @mpetroff,

I'm sorry I didn't realize you replied. Please see below:

QGIS version 3.8.3-Zanzibar QGIS code revision 685d8b15d2
Compiled against Qt 5.12.3 Running against Qt 5.12.3
Compiled against GDAL/OGR 2.4.1 Running against GDAL/OGR 2.4.1
Compiled against GEOS 3.7.2-CAPI-1.11.2 Running against GEOS 3.7.2-CAPI-1.11.2 b55d2125
PostgreSQL Client Version 11.3 SpatiaLite Version 4.3.0a
QWT Version 6.1.4 QScintilla2 Version 2.11.1
Compiled against PROJ 5.2.0 Running against PROJ Rel. 5.2.0, September 15th, 2018
OS Version macOS 10.15    
mpetroff commented 4 years ago

I'm testing against Qt 5.9, so there could be a change in more recent Qt versions causing the issue. However, I don't see anything in the release notes that would suggest an issue. Unfortunately, I don't have any ideas for changes to make to try to fix this.

mpetroff commented 4 years ago

@brannonvann This should be fixed now in v0.9.15. Someone emailed me about the same issue, so I took a fresh look. It turns out that the issue only appeared on a fresh install, without existing saved settings, which is why I wasn't able to reproduce it before. The issue was due to Qt deciding to cast QPoint(0, 0) to a null QVariant; changing the default position to QPoint(0, 10) fixed the issue, since it stays as a QPoint object.