Buongiorno,
ho notato che con la versione 3.34.11 del QGIS la funzione NN Join non funziona più. Mi dice che c’è un errore nello script. C’è un modo per risolvere mantenendo la versione del QGIS? Grazie
Buongiorno,
il problema è stato già segnalato nel repository del plugin
opened 02:32PM - 11 Dec 24 UTC
NNJoin does not work on QGIS 3.34 and 3.40.
Heafter the error detalis from th… e python console:
_Traceback (most recent call last):
File "C:\Users/.../AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NNJoin\NNJoin_plugin.py", line 137, in run
self.dlg.progressBar.setValue(0.0)
TypeError: setValue(self, value: int): argument 1 has unexpected type 'float'_
Tried to fix the error with the following solution: https://gis.stackexchange.com/questions/439177/nnjoin-not-returning-any-result
After the changes, NNJoin open but after executing it QGIS crashes. Hearafter the crash report of QGis 3.40:
## Report Details
**Python Stack Trace**
```
Windows fatal exception: access violation
Current thread 0x000064c0 (most recent call first):
File "C:\Users/memno/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NNJoin\NNJoin_gui.py", line 585 in showError
self.iface.messageBar().pushMessage(self.tr('Error'), text,
File "C:\Users/memno/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NNJoin\NNJoin_gui.py", line 221 in workerFinished
self.showError(self.tr('Aborted') + '!')
File "C:\Users/memno/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\NNJoin\NNJoin_plugin.py", line 177 in run
self.dlg.exec_()
```
**Stack Trace**
```
QVariantAnimation::endValue :
QFocusFrame::tr :
QToolBar::widgetForAction :
QTabBarPrivate::~QTabBarPrivate :
QTabBarPrivate::isAnimated :
QLayoutPrivate::doResize :
QLayout::activate :
QWidgetPrivate::setVisible :
QWidget::setVisible :
QgsMessageBar::showItem :
QgsMessageBar::pushItem :
QgsMessageBar::pushMessage :
QgsPresetSchemeColorRamp::clone :
PyLong_FromString :
PyObject_Vectorcall :
PyObject_Vectorcall :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyArg_CheckPositional :
PyObject_Call :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QObject::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QCoreApplicationPrivate::sendPostedEvents :
qt_plugin_query_metadata :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QDialog::exec :
PyInit_QtWidgets :
PyLong_FromString :
PyObject_Vectorcall :
PyObject_Vectorcall :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyArg_CheckPositional :
PyObject_Call :
PyObject_Call :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
PyInit_QtCore :
QObject::qt_static_metacall :
QAction::activate :
QAbstractButton::click :
QAbstractButton::mouseReleaseEvent :
QToolButton::mouseReleaseEvent :
QWidget::event :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QApplicationPrivate::sendMouseEvent :
QSizePolicy::QSizePolicy :
QSizePolicy::QSizePolicy :
QApplicationPrivate::notify_helper :
QApplication::notify :
QgsApplication::notify :
QCoreApplication::notifyInternal2 :
QGuiApplicationPrivate::processMouseEvent :
QWindowSystemInterface::sendWindowSystemEvents :
QEventDispatcherWin32::processEvents :
qt_plugin_query_metadata :
QEventLoop::exec :
QCoreApplication::exec :
main :
BaseThreadInitThunk :
RtlUserThreadStart :
```
**QGIS Info**
QGIS Version: 3.40.1-Bratislava
QGIS code revision: 989853a7
Compiled against Qt: 5.15.13
Running against Qt: 5.15.13
Compiled against GDAL: 3.9.3
Running against GDAL: 3.9.3
**System Info**
CPU Type: x86_64
Kernel Type: winnt
Kernel Version: 10.0.22631
Se puoi, aggiungi e/o conferma problema inserendo le caratteristiche del tuo sistema.
saluti
1 Like
Purtroppo l’autore del plugin, Håvard Tveite , è deceduto 4 anni fa e il codice sorgente di quel plugin, così come quello di quasi tutti gli altri plugin sviluppati da lui, non viene aggiornato da circa 6 anni.
@tecnico_9 , se indichi con precisione qual è esattamente l’errore, si può provare a risolverlo.
Ma questo plugin non svolge la stessa procedura dell’algoritmo di processing “Join attributes by nearest ” / “Unisci attributi dal vettore più vicino ”?
A presto.
Andrea
2 Likes
@tecnico_9 , quindi qual è esattamente l’errore?