Open jedwards4b opened 3 years ago
The fix is this:
if verbosity < self.verbosity[0]:
print(self.to_str(*args, **kwargs))
I'm not sure I can post a PR to this repo.
@kmpaul this issue was opened in February and still hasn't been addressed.
@jedwards4b: Sorry. I missed this in the noise. Since the fix is so simple, I'd welcome a PR.
I also just made you a maintainer so you can advance these issues faster.
I'm not sure this fixes it entirely. There are some subtle aspects of the scripts as I recall where verbosity needs to be a list, and others where it is an integer. Can you test this out @kmpaul ?
@dabail10: I will. I agree that that doesn't seem like the right fix. I'm unsure why self.verbosity
is a list
and not an int
. Can you provide a "minimal reproducible example" of the problem?
I'm not sure if I can. Let me try to dig up my post-process runs.
@jedwards4b @dabail10:
In lines 391-398 of NCAR/CESM_postprocessing/CESM_postprocessing/timeseries/timeseries/cesm_timeseries_generator.py
:
It indicates that the VPrinter
's verbosity
is set from the debug
value that is gathered in the commandline_options()
function. The commandline_options()
function defines the --debug
option as:
And the debug
variable returned by commandline_options()
are shown in these two lines here:
According to the argparse
documentation for nargs
, setting nargs
to 1
means that one argument will be "consumed" from the commandline and put into a list. Hence, the options.debug
should be a list
with 1 element. And the function is returning the [0]
element from the list.
So, I don't understand how debug
could be a list
at all. It should just be an int
.
I think we need a way of reproducing the error.