Dec-18-2019, 03:16 PM
on line 62 you assign to
to resolve it you can add
However note that using global variables is bad practice. So the best would be to refactor your code.
err
. Thus err
in the body of get_time() is different variable (i.e. with local scope) than the err
in the global scope. obviously it's not the else part that is executed and on line 69 err
is not defined.to resolve it you can add
global err
statement at the top of get_time() function.However note that using global variables is bad practice. So the best would be to refactor your code.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs