QSWAT+ Error: 'GlobalVars' is not defined; (likewise '''AboutQSWAT' & "Parameters" are not defined)

7 views
Skip to first unread message

Bill Capehart

unread,
Mar 31, 2026, 12:23:21 AM (4 days ago) Mar 31
to QSWAT+
Hello All:  I am getting the following GlobalVars Error when creating a QSWAT+ v3.1.2 project.  A similar error occurs when I load in a Qswat project file from earlier Qswat+ versions.  Additionally, I get similar errors when pushing the "About QSwat" button and "Parameters" button.  Otherwise I am frozen out of the QSwat Opening Dialog Box.

I am running this on the QGIS Desktop 3.44.8 LTR,  running on a Parallels Windows emulator under MacOS 26.4 (Tahoe).  I installed QSWAT+ with the swatplus-windows-installer-3.1.4.zip

Full Logs are Below.  

#####################################

#

# Versions

#


QSWAT+ 3.1.2

QGIS Desktop 3.44.8

Parallels Desktop for Mac Pro Edition 26.3.0 (57392)


#

#####################################




#####################################

#

# Stacktrace LOG

#



Version:1.0 StartHTML:0000000107 EndHTML:0000005414 StartFragment:0000000538 EndFragment:0000005372

An error has occurred while executing Python code: 

NameError: name 'GlobalVars' is not defined

Traceback (most recent call last):

  File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\QSWATPlusMain.py", line 311, in newProject

    self.setupProject(proj, False)

  File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\QSWATPlusMain.py", line 351, in setupProject

    self._gv = GlobalVars(self._iface, QSWATPlus.__version__, self.plugin_dir, isBatch, isHUC, isHAWQS, logFile)

               ^^^^^^^^^^

NameError: name 'GlobalVars' is not defined


Python version: 3.12.13 (main, Mar  5 2026, 15:14:54) [MSC v.1944 64 bit (AMD64)]
QGIS version: 3.44.8-Solothurn Solothurn, d25052deb8b 

Python Path:

  • C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr/./python
  • C:/Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:/Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
  • C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr/./python/plugins
  • C:\PROGRA~1\QGIS34~1.8\apps\grass\grass84\etc\python
  • C:\Users\wjc\Documents
  • C:\Program Files\QGIS 3.44.8\bin\python312.zip
  • C:\PROGRA~1\QGIS34~1.8\apps\Python312\DLLs
  • C:\PROGRA~1\QGIS34~1.8\apps\Python312\Lib
  • C:\Program Files\QGIS 3.44.8\bin
  • C:\PROGRA~1\QGIS34~1.8\apps\Python312
  • C:\PROGRA~1\QGIS34~1.8\apps\Python312\Lib\site-packages
  • C:\PROGRA~1\QGIS34~1.8\apps\Python312\Lib\site-packages\win32
  • C:\PROGRA~1\QGIS34~1.8\apps\Python312\Lib\site-packages\win32\lib
  • C:\PROGRA~1\QGIS34~1.8\apps\Python312\Lib\site-packages\Pythonwin
  • C:/Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus

#

#####################################




#####################################

#

# QSWAT+ LOG

#


Version:1.0 StartHTML:0000000107 EndHTML:0000002964 StartFragment:0000000538 EndFragment:0000002928

2026-03-30T21:00:23     INFO    QSWAT+ failed to import HRUs: Traceback (most recent call last):
              File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\QSWATPlusMain.py", line 55, in <module>
              from .hrus import HRUs
              File "C:\PROGRA~1/QGIS34~1.8/apps/qgis-ltr/./python\qgis\utils.py", line 1100, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\hrus.py", line 50, in <module>
              from .polygonizeInC2 import Polygonize # type: ignore # @UnresolvedImport
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "C:\PROGRA~1/QGIS34~1.8/apps/qgis-ltr/./python\qgis\utils.py", line 1100, in _import
              mod = _builtin_import(name, globals, locals, fromlist, level)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "polygonizeInC2.pyx", line 1, in init QSWATPlus.polygonizeInC2
             ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
             

2026-03-30T21:00:23     INFO    QGIS version: 3.44.8-Solothurn; QSWAT+ version: 3.1.2

2026-03-30T21:04:27     INFO    Project file is C:/Users/wjc/Documents/QSWAT_MODELS\QSWAT_RR_2026\QSWAT_RR_2026.qgs

2026-03-30T21:04:29     INFO    Project file is C:/Users/wjc/Documents/QSWAT_MODELS/QSWAT_RR_2026/QSWAT_RR_2026.qgs


#

#####################################


#####################################

#

# General LOG

#


Version:1.0 StartHTML:0000000107 EndHTML:0000001660 StartFragment:0000000538 EndFragment:0000001624

2026-03-30T21:00:26     INFO    QgsApplication state:
              - QGIS_PREFIX_PATH env var: C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr
              - Prefix: C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr
              - Plugin Path: C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr/plugins
              - Package Data Path: C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr/.
              - Active Theme Name: default
              - Active Theme Path: C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr/./resources/themes\default\icons/
              - Default Theme Path: :/images/themes/default/
              - SVG Search Paths: C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr/./svg/
              C:/Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/svg/
              - User DB Path: C:/PROGRA~1/QGIS34~1.8/apps/qgis-ltr/./resources/qgis.db
              - Auth DB Path: QSQLITE://C:/Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/qgis-auth.db
  


#

#####################################




#####################################

#

# Python Error LOG

#


Version:1.0 StartHTML:0000000107 EndHTML:0000001366 StartFragment:0000000538 EndFragment:0000001330

2026-03-30T21:04:29     WARNING    Traceback (most recent call last):
              File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\QSWATPlusMain.py", line 311, in newProject
              self.setupProject(proj, False)
              File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\QSWATPlusMain.py", line 351, in setupProject
              self._gv = GlobalVars(self._iface, QSWATPlus.__version__, self.plugin_dir, isBatch, isHUC, isHAWQS, logFile)
              ^^^^^^^^^^
             NameError: name 'GlobalVars' is not defined


Version:1.0 StartHTML:0000000107 EndHTML:0000001644 StartFragment:0000000538 EndFragment:0000001608

2026-03-30T21:45:25     WARNING    Traceback (most recent call last):
              File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\QSWATPlusMain.py", line 394, in runParams
              params = Parameters(self._gv)
              ^^^^^^^^^^
             NameError: name 'Parameters' is not defined
             

2026-03-30T21:46:11     WARNING    Traceback (most recent call last):
              File "C:\Users/wjc/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus\QSWATPlus\QSWATPlusMain.py", line 233, in about
              form = AboutQSWAT(self._gv)
              ^^^^^^^^^^
             NameError: name 'AboutQSWAT' is not defined
              


#

#####################################





#####################################

#

# Messages LOG

#


Version:1.0 StartHTML:0000000107 EndHTML:0000000766 StartFragment:0000000538 EndFragment:0000000730

2026-03-30T21:04:29     WARNING    Python error : An error has occurred while executing Python code: See message log (Python Error) for more details.


#

#####################################





Please advise, and much obliged,
Bill Capehart
SD Mines.




Chris George

unread,
Mar 31, 2026, 4:25:56 PM (4 days ago) Mar 31
to Bill Capehart, QSWAT+

The problrm is that QGIS 3.44 uses a different version of numpy.  Try the leatest QSWAT+ 3.2.1 https://github.com/swat-model/QSWATPlus/releases/tag/v3.2.1

Chris

On 31/03/2026 05:09, 'Bill Capehart' via QSWAT+ wrote:
Hello All:  I am getting the following GlobalVars Error when creating a QSWAT+ v3. 1. 2 project.  A similar error occurs when I load in a Qswat project file from earlier Qswat+ versions.  Additionally, I get similar errors when pushing the "About
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
--
You received this message because you are subscribed to the Google Groups "QSWAT+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qswatplus+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/qswatplus/a6205f77-2e87-4d86-962b-2bac592ba3f6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages