It is possible to hit an UnboundLocalError when calling con, for example from this example (though note with some environment/setup of cfp and its plotvars we run into Issue #59 first ,but I am noting it here to save time to create another minimal example that might display the bug):
>>> f = cf.read("cfplot_data/ukcp_rcm_test.nc")[0]
>>> cfp.mapset(proj="UKCP", resolution="50m") # note Issue #59 for running this by test suite
>>>
>>> cfp.levs(-3, 7, 0.5)
>>> cfp.setvars(grid_x_spacing=1, grid_y_spacing=1)
>>> cfp.con(f, lines=False)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 4100, in con
cbar(
File "/home/slb93/git-repos/cf-plot/cfplot/cfplot.py", line 10056, in cbar
ax1,
^^^
UnboundLocalError: cannot access local variable 'ax1' where it is not associated with a value
It is possible to hit an
UnboundLocalError
when callingcon
, for example from this example (though note with some environment/setup ofcfp
and itsplotvars
we run into Issue #59 first ,but I am noting it here to save time to create another minimal example that might display the bug):