An error has occured while executing Python code

202 views
Skip to first unread message

khaoula belhassen

unread,
Sep 11, 2018, 10:38:57 AM9/11/18
to SWAT-user
Hello, 
I'm working with SWAT for the first time. My task is to update a swat model developed by my colleague so when I tried to run the model an error message appears and I can not do anything even the 4 steps are disabled. Knowing that my colleague used the same model and managed to display the results.
I really need your help.
Thank you.
Herewith the text of the error as well as a screenshot.


An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:/Users/Admin/.qgis2/python/plugins\QSWAT\qswat.py", line 166, in run
    self.setupProject(proj, False)
  File "C:/Users/Admin/.qgis2/python/plugins\QSWAT\qswat.py", line 236, in setupProject
    self._gv = GlobalVars(isBatch)
  File "C:/Users/Admin/.qgis2/python/plugins\QSWAT\globals.py", line 187, in __init__
    self.db = DBUtils(self.projDir, self.projName, self.dbProjTemplate, self.dbRefTemplate, self.isBatch)
  File "C:/Users/Admin/.qgis2/python/plugins\QSWAT\DBUtils.py", line 57, in __init__
    self.updateProjDb(Parameters._SWATEDITORVERSION)
  File "C:/Users/Admin/.qgis2/python/plugins\QSWAT\DBUtils.py", line 252, in updateProjDb
    QSWATUtils.error('Could not update table in project database {0}: {1}'.format(self.dbFile, repr(ex)), self.isBatch)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 40: ordinal not in range(128)


Python version:
2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]


QGIS version:
2.6.1-Brighton Brighton, e2a51df

Python path: ['C:/PROGRA~2/QGISBR~1/apps/qgis/./python/plugins\\processing', 'C:/PROGRA~2/QGISBR~1/apps/qgis/./python', u'C:/Users/Admin/.qgis2/python', u'C:/Users/Admin/.qgis2/python/plugins', 'C:/PROGRA~2/QGISBR~1/apps/qgis/./python/plugins', 'C:\\PROGRA~2\\QGISBR~1\\bin\\python27.zip', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\DLLs', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~2\\QGISBR~1\\bin', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\jinja2-2.7.2-py2.7.egg', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\markupsafe-0.23-py2.7-win32.egg', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\python_dateutil-2.2-py2.7.egg', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\pytz-2014.2-py2.7.egg', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\Shapely-1.2.18-py2.7-win32.egg', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\six-1.6.1-py2.7.egg', 'C:\\PROGRA~2\\QGISBR~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\PROGRA~2\\QGISBR~1\\apps\\qgis\\python\\plugins\\fTools\\tools', 'C:/Users/Admin/Desktop/SWAT/BASE DE DONN\xc3\xa9s']


Capture 1.PNG
Capture.PNG
Reply all
Reply to author
Forward
0 new messages