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.
#3 Updated by Victor Ducrot about 6 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 about 6 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