Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Open

local variable 'status' referenced before assignment #16

Mathieson opened this issue Jul 14, 2012 · 2 comments

Comments

@Mathieson
Copy link

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.

@atwright147
Copy link

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.

@LiaoHongzheng
Copy link

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 = '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants