opengeos / whitebox-python

WhiteboxTools Python Frontend

Home Page:https://pypi.org/project/whitebox/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ResourceWarnings for unclosed

InsolublePancake opened this issue · comments

  • whitebox version: 2.0.3
  • Python version: 3.8
  • Operating System: "Rocky Linux 8.5

Description

I am creating drainage lines from an input DEM. I am running the following tools in succession so that the output of a tool becomes the input of the next:

  • breach_depressions_least_cost
  • d8_pointer
  • d8_flow_accumulation
  • extract_streams

It all works and I'm happy with the output, but I get a lot of warning messages about resource warnings like the following:

/usr/lib64/python3.8/subprocess.py:946: ResourceWarning: subprocess 2454694 is still running
_warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/mydata/drainage_lines.py:558: ResourceWarning: unclosed file <_io.TextIOWrapper name=7 encoding='UTF-8'>
wbt.set_verbose_mode(False)

This fills the error log with messages, despite the fact that tool appears to function fine. I've searched for the process ids but they seem to have been closed, despite the message.

Is there a step I need to take after running one tool and before running the next?

This appears to be a Whitebox-Tools backend issue. Please open an issue at https://github.com/jblindsay/whitebox-tools/issues