mpetroff / qgsazimuth

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

Error on Qgis 3.4.11 #23

Closed kylefelipe closed 4 years ago

kylefelipe commented 4 years ago

Using a scratch layer to test, qgis shows the follow issue:

Um erro ocorreu enquanto executava o código Python:

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 "/home/kylefelipe/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgsAzimuth/qgsAzimuth.py", line 192, in run self.loadConf() # get config data File "/home/kylefelipe/.local/share/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'

Versão do Python: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] Versão do QGIS: 3.4.11-Madeira Madeira, a65fc10eae

Caminho do Python: /usr/share/qgis/python /home/kylefelipe/.local/share/QGIS/QGIS3/profiles/default/python /home/kylefelipe/.local/share/QGIS/QGIS3/profiles/default/python/plugins /usr/share/qgis/python/plugins /usr/local/bin/python3.6 /usr/lib/python35.zip /usr/lib/python3.5 /usr/lib/python3.5/plat-x86_64-linux-gnu /usr/lib/python3.5/lib-dynload /home/kylefelipe/.local/lib/python3.5/site-packages /usr/local/lib/python3.5/dist-packages /usr/lib/python3/dist-packages /home/kylefelipe/.local/share/QGIS/QGIS3/profiles/default/python /home/kylefelipe/.local/share/QGIS/QGIS3/profiles/default/python/plugins/DigitizingTools/tools /home/kylefelipe/.local/share/QGIS/QGIS3/profiles/default/python/plugins/DigitizingTools /home/kylefelipe/.local/share/QGIS/QGIS3/profiles/default/python/plugins/shapetools/ext-libs

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

QT = 5.7.1

mpetroff commented 4 years ago

I'm unable to reproduce the issue on Qt 5.9. Can you please try adding the following to the top of your local copy of qgsAzimuth.py, directly after the import os line?

import sip
sip.setapi("QVariant", 2)

For some reason, the variables aren't being cast. Per this Stack Overflow answer, the above change should fix the issue. Since I can't reproduce the issue, it's difficult for me to test fixes.

kylefelipe commented 4 years ago

This solved the issue...but i get a new one....