Python Error

590 views
Skip to first unread message

Ganesh Bala

unread,
Feb 4, 2017, 12:16:32 PM2/4/17
to SWAT-user
I have completed up to HRU after that, 3rd step has activated then i closed it and after sometime when i opened 3rd step doesn't works it shows error as "Error while executing python code" with following errors as below,,, How to recover from this..anyone help me..

Traceback (most recent call last):
  File "C:/Users/GANESH BALA/.qgis2/python/plugins\QSwat\qswat.py", line 461, in startEditor
    self._gv.setSWATEditorParams()
  File "C:/Users/GANESH BALA/.qgis2/python/plugins\QSwat\globals.py", line 386, in setSWATEditorParams
    tree = ET.parse(path)
  File "C:\PROGRA~2\QGISBR~1\apps\Python27\lib\xml\etree\ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "C:\PROGRA~2\QGISBR~1\apps\Python27\lib\xml\etree\ElementTree.py", line 656, in parse
    parser.feed(data)
  File "C:\PROGRA~2\QGISBR~1\apps\Python27\lib\xml\etree\ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "C:\PROGRA~2\QGISBR~1\apps\Python27\lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
    raise err
ParseError: not well-formed (invalid token): line 7, column 51


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/GANESH BALA/.qgis2/python', u'C:/Users/GANESH BALA/.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', 'F:/SG&SWRDC/GIRDHUMAL/Project1']

Error.png

Chris George

unread,
Feb 6, 2017, 11:36:52 AM2/6/17
to swat...@googlegroups.com
It looks like the file C:\SWAT\SWATEditor\SwatEditor.exe.config has
become corrupted. I am attaching mine, and you might be able by
comparing them to see what is wrong. Yours seems to have some error in
line 7, column 51. If you can't fix yours, it should be enough to
replace yours with mine: the fields will be redefined when you click on
step 3 in QSWAT.

Chris
> --
> You received this message because you are subscribed to the Google
> Groups "SWAT-user" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swatuser+u...@googlegroups.com
> <mailto:swatuser+u...@googlegroups.com>.
> To post to this group, send email to swat...@googlegroups.com
> <mailto:swat...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/swatuser.
> For more options, visit https://groups.google.com/d/optout.
SwatEditor.exe.config

Rahul Agrawal

unread,
Dec 15, 2022, 8:31:58 PM12/15/22
to SWAT-user
Thanks Error Solved
Reply all
Reply to author
Forward
0 new messages