Skip to content

vector_stream_network_analysis function fails due to missing arguments #78

@speleophysics

Description

@speleophysics
  • whitebox version: 2.3.5
  • Python version: 3.12.7
  • Operating System: Windows or Linux

Description

I was trying to run the vector_stream_network_analysis tool and kept getting errors about arguments. First off, it was cutting_height.
Removing cutting_height lead to errors about dem being undefined. I looked at the code, and it looks like the dem and cutting_height arguments were removed in b2dbc20. However, these variables are still used by the code inside function. I'm not sure if they were accidentally removed, or if the functionality has changed, and they also need to be removed from inside the function. I suspect this is the source of my problems.

What I Did

stream_order_shapefileName = 'rush-creek-stream-order.shp'
stream_order_path = os.path.join(directory, stream_order_shapefileName)

wbt.vector_stream_network_analysis(
    stream_shapefile_path, 
    filled_path, 
    stream_order_path, 
    cutting_height=10.0,
    snap=0.1,
)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[15], line 4
      1 stream_order_shapefileName = 'rush-creek-stream-order.shp'
      2 stream_order_path = os.path.join(directory, stream_order_shapefileName)
----> 4 wbt.vector_stream_network_analysis(
      5     stream_shapefile_path, 
      6     filled_path, 
      7     stream_order_path, 
      8     cutting_height=10.0,
      9     snap=0.1,
     10 )

TypeError: WhiteboxTools.vector_stream_network_analysis() got an unexpected keyword argument 'cutting_height'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions