cannot convert float NaN to integer

63 views
Skip to first unread message

andriana e_

unread,
Jul 12, 2023, 12:08:41 PM7/12/23
to SWAT-user
Hi all, can anyone help me with this? I really don't know what to do anymore. I have repeatedly repaired the cover/soil, but it still appears like this:

ValueError: cannot convert float NaN to integer

Traceback (most recent call last):
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT3_9\QSWAT\hrus.py", line 398, in readFiles
    OK = self.CreateHRUs.generateBasins(self._dlg.progressBar, self._dlg.progressLabel, root)
  File "C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT3_9\QSWAT\hrus.py", line 2379, in generateBasins
    elevation = int(elevation * self._gv.verticalFactor)
ValueError: cannot convert float NaN to integer


Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS version: 3.30.3-'s-Hertogenbosch 's-Hertogenbosch, 2411cec1

Python Path:
  • C:/PROGRA~1/QGIS33~1.3/apps/qgis/./python
  • C:/Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:/Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
  • C:/PROGRA~1/QGIS33~1.3/apps/qgis/./python/plugins
  • C:\PROGRA~1\QGIS33~1.3\apps\grass\grass82\etc\python
  • C:\Users\Lenovo\Documents
  • C:\Program Files\QGIS 3.30.3\bin\python39.zip
  • C:\PROGRA~1\QGIS33~1.3\apps\Python39\DLLs
  • C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib
  • C:\Program Files\QGIS 3.30.3\bin
  • C:\PROGRA~1\QGIS33~1.3\apps\Python39
  • C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages
  • C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\win32
  • C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\win32\lib
  • C:\PROGRA~1\QGIS33~1.3\apps\Python39\lib\site-packages\Pythonwin
  • C:/Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python
  • C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWAT3_9\QSWAT
  • C:\Users/Lenovo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\QSWATPlus3_9\QSWATPlus

Please help me. I need it to complete my final project😭

andriana e_

unread,
Jul 12, 2023, 12:08:41 PM7/12/23
to SWAT-user

George, Christopher

unread,
Jul 13, 2023, 6:39:38 AM7/13/23
to andriana e_, SWAT-user
It looks like the problem is in your DEM.   Try recreating or downloading your DEM again: I don't know where it came from.  If you can't fix it send me your DEM and I will try.

Chris
 

From: swat...@googlegroups.com <swat...@googlegroups.com> on behalf of andriana e_ <aeikin...@gmail.com>
Sent: 12 July 2023 01:56
To: SWAT-user <swat...@googlegroups.com>
Subject: [SWAT-user:12529] cannot convert float NaN to integer
 
Caution: This email may have originated from outside the organization. Please exercise additional caution with any links and attachments.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/swatuser/0a3300b0-adf2-4f3c-97e6-24ac3aec2dc0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages