Hello, when i tried to Mark nodes and find paths using veroviz, I got this error
UnboundLocalError: local variable 'timeInSeconds' referenced before assignment
The “UnboundLocalError: local variable referenced before assignment” error occurs in Python when you try to access a local variable before it has been assigned a value. This is typically caused by a typo, or by using the same name for a local variable and a global variable in the same scope or when you forget to assign a value to a local variable before using it.
x = x + 1 print(x) // This code will result in the error
to solve this…
x = 0 //assign a value to the local variable x = x + 1 print(x)
To resolve the “UnboundLocalError: local variable referenced before assignment” error, you need to assign a value to the local variable before you use it. Another way to resolve this error is to use the global keyword to access the global variable with the same name.