error in "split_hucs.py"

10 views
Skip to first unread message

suraj shrestha

unread,
Sep 16, 2025, 1:02:37 PMSep 16
to Amanzi-ATS Users
Dear Ethan,
I got an error while running the watershed workflow zoomable map, showing 

"File ~/watershed-workflow/watershed_workflow/split_hucs.py:288, in SplitHUCs.explore(self, column, m, marker, name, **kwargs)

286 if column == names.ID and names.ID not in self.df:
287 newname = names.ID+"_as_column"
--> 288 if newname not in df:
289 self.df[newname] = self.df.index.astype('string')
290 column = names.ID+"_as_column"
NameError: name 'df' is not defined",
i should include self.df in line 288 of split_hucs.py, or am I wrong?

suraj

Coon, Ethan

unread,
Sep 16, 2025, 4:58:07 PMSep 16
to suraj shrestha, Amanzi-ATS Users

This is a bug in the latest release which will get fixed in a patch soon (I know I’ve fixed it locally, and it may be fixed on the v2.0 branch, but it’s not in the release or docker containers yet).  It should read (line 288):

 

“if newname not in self.df”

 

Ethan

 

From: ats-...@googlegroups.com <ats-...@googlegroups.com> on behalf of suraj shrestha <theshres...@gmail.com>
Date: Tuesday, September 16, 2025 at 11:02
AM
To: Amanzi-ATS Users <ats-...@googlegroups.com>
Subject: [EXTERNAL] error in "split_hucs.py"

Dear Ethan, I got an error while running the watershed workflow zoomable map, showing  "File ~/watershed-workflow/watershed_workflow/split_hucs.py:288, in SplitHUCs.explore(self, column, m, marker, name, **kwargs) 286 if column == names.ID and

--
You received this message because you are subscribed to the Google Groups "Amanzi-ATS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-users+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ats-users/aaeefef4-23da-48d2-8740-2df80802c9can%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages