Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

local variable 'status' referenced before assignment #16

Open
Mathieson opened this Issue Jul 14, 2012 · 2 comments

Comments

Projects
None yet
3 participants

I am receiving this error (the subject line) when right clicking in the side bar. The console is also spitting out the following:

Traceback (most recent call last):
File ".\sublime_plugin.py", line 280, in is_visible_
File ".\Tortoise.py", line 71, in handler
File ".\Tortoise.py", line 264, in is_visible
File ".\Tortoise.py", line 426, in get_status
File ".\Tortoise.py", line 353, in process_status
UnboundLocalError: local variable 'status' referenced before assignment
error: [Error 2] The system cannot find the file specified

It appears that on line 345 in Tortoise.py there is a try/except and the try is declaring a status variable. Something in here is failing within vcs.check_status and the status is not getting declared in the except. There are more references to the status variable later, but when going through the except status does not exist. This is causing the error. Not sure what is causing vcs.check_status to fail, however.

I am experiencing the same problem too:

Traceback (most recent call last):
  File ".\sublime_plugin.py", line 280, in is_visible_
  File ".\Tortoise.py", line 71, in handler
  File ".\Tortoise.py", line 228, in is_visible
  File ".\Tortoise.py", line 446, in get_status
  File ".\Tortoise.py", line 353, in process_status
UnboundLocalError: local variable 'status' referenced before assignment
error: [Error 2] The system cannot find the file specified

I have uninstalled until this is corrected.

I have fixed my local copy by adding a placeholder status variable at line 336

def process_status(self, vcs, path):
    global file_status_cache
    status = '';

atwright147 added a commit to atwright147/sublime_tortoise that referenced this issue Nov 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment