If "x" exists, then print "x exists".
I ask this because I always get this error:
UnboundLocalError at /settings/
local variable 'avatarlink' referenced before assignment
Why do you need to know? If the code breaks because of this, it's probably because the code is wrong anyway and needs to be fixed.
That said, try checking if 'x' in locals()
or if 'x' in globals()
, as appropriate to where you're expecting it to be.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With