question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] local variable 'repo' referenced before assignment

See original GitHub issue

Hi, I’ve hit the following error on l.147:

Traceback (most recent call last):
  File "wiki.py", line 315, in <module>
    gitcom()
  File "wiki.py", line 146, in gitcom
    repo.git.add("--all")
UnboundLocalError: local variable 'repo' referenced before assignment

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Linbreuxcommented, Mar 2, 2022

I looked into the code, and you are right that there is a bug. #21 should fix this. Though, this means that you still have a problem using the versioning system. If this did not fix it, feel free to reply!

1reaction
artiviscommented, Mar 2, 2022

Nop I’m creating my own image (hence my own Dockerfile). I’ve tried again and the issue seems to be fixed 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

function - local variable referenced before assignment
To make this work, you need to move the assignment to won inside main() : def main(): won = 0 ... If you...
Read more >
local variable 'lv' referenced before assignment · Issue #997 ...
The Unboundlocalerror : local variable referenced before assignment is raised when you try to use a variable before it has been assigned in...
Read more >
Python local variable referenced before assignment Solution
The UnboundLocalError : local variable referenced before assignment error is raised when you try to assign a value to a local variable before...
Read more >
Solving Python Error - UnboundLocalError: local variable 'x ...
Solution: UnboundLocalError can be solved by changing the scope of the variable which is complaining. You need to explicitly declare the variable global....
Read more >
Bug report #15352: Dissolve error : "local variable 'nElement ...
Dissolve error : "local variable 'nElement' referenced before assignment" ; Processing/QGIS · 2.14.3 · Mac OS · No · No ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found