Python Forum
UnboundLocalError: local variable ' ' referenced before assignment
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UnboundLocalError: local variable ' ' referenced before assignment
#2
show full traceback in error tags

note that when tilbage <= 2 then if body (lines 17-18) will not be executed and dosis is not defined.
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

Reply


Messages In This Thread
RE: UnboundLocalError: local variable ' ' referenced before assignment - by buran - Sep-03-2019, 03:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  creating arbitrary local variable names Skaperen 9 2,123 Sep-07-2024, 12:12 AM
Last Post: Skaperen
  how solve: local variable referenced before assignment ? trix 5 1,962 Jun-15-2024, 07:15 PM
Last Post: trix
  It's saying my global variable is a local variable Radical 5 6,985 Oct-02-2023, 12:57 AM
Last Post: deanhystad
  local varible referenced before assignment SC4R 6 3,535 Jan-10-2023, 10:58 PM
Last Post: snippsat
  How does UnboundLocalError work? deanhystad 3 2,679 Feb-25-2022, 01:21 AM
Last Post: bowlofred
  UnboundLocalError: local variable 'wmi' referenced before assignment ilknurg 2 3,162 Feb-10-2022, 07:36 PM
Last Post: deanhystad
  Referenced before assignment finndude 3 4,443 Mar-02-2021, 08:11 PM
Last Post: finndude
  exec + subprocess = UnboundLocalError paul18fr 6 5,092 Feb-04-2021, 06:27 AM
Last Post: Gribouillis
  ReferenceError: weakly-referenced object no longer exists MrBitPythoner 17 17,223 Dec-14-2020, 07:34 PM
Last Post: buran
  Assignment of non-existing class variable is accepted - Why? DrZ 6 7,003 Jul-13-2020, 03:53 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020