The ind_dim_x and ind_dim_y are defined in a try: block and then used outside of it.
If this block raises an IndexError, the exception is ignored and the following code is executed, trying to access variables which have not been defined.
Fix: the code which uses these variables can be moved inside the try: block
The
ind_dim_x
andind_dim_y
are defined in atry:
block and then used outside of it. If this block raises anIndexError
, the exception is ignored and the following code is executed, trying to access variables which have not been defined.Fix: the code which uses these variables can be moved inside the
try:
block