I have defined a variable outside a while loop in the following code:
page_num = 1 page_size = 2000 # CMR page size limit
granule_arr = []
while True:
page_num += 1
However, it is still spitting out the following error:
ERROR: UndefVarError: `page_num` not defined
According to another answer on Stackoverflow, they had a similar problem, but his variable was defined inside the while loop. In my case, the variable is outside the while loop, and I am unable to deduce why I am receiving this error.