Bug report #15582
Union error: "global name 'vproviderA' is not defined
|Affected QGIS version:||2.16.2||Regression?:||No|
|Operating System:||Windows 10||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23506|
In Qgis 2.16.2-2 and 2.16.2-3 the " Join" tool does not work . When trying to join two shapefiles , an error occurs :
"global name 'vproviderA' is not defined. See log for more details" .
File "C:/PROGRA~1/QGIS2~1.16/apps/qgis/./python/plugins\\processing\\algs\\qgis\\Union.py", line 78, in processAlgorithm
NameError: global name 'vproviderA' is not defined.
#1 Updated by Frank Sokolic almost 5 years ago
I get the same error when using the Union tool on QGIS Master with Ubuntu 16.04. The error occurs when accessing the tool via the menu (Vector > Geoprocessing Tools > Union) or via the Processing toolbox (QGIS Algorithms > Vector overlay tools > Union).
#3 Updated by Victor Ducrot almost 5 years ago
vproviderA has to be replaced by vlayerA line 78 of /usr/share/qgis/python/plugins/processing/algs/qgis/Union.py in Linux.
The modification seems to have been done already on qgis-master on github: https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/Union.py
You can also presumably just replace your Union.py file by this one.
#5 Updated by Eivind Olsen almost 5 years ago
Same error on Windows 7 64 bit with QGIS 2.16.3, both within QGIS and from a standalone script. Editing "C:\\OSGeo4W64\\apps\\qgis\\python\\plugins\\processing\\algs\\qgis\\Union.py" as suggested in #4 above does the trick for the Union tool from within QGIS. It seems to fix the problem in the standalone script, but now produces new errors:
ERROR 1: Attempt to write non-polygon (MULTILINESTRING) geometry to POLYGON type
ERROR 1: Attempt to write non-polygon (POINT) geometry to POLYGON type shapefile