Andrew.py errors

Issue #8 new
Former user created an issue

Mutiple python (2.7) errors on mac ?

  File "./Andrew.py", line 301, in handle_thread
    sublime.active_window().active_view().set_status('andrew', state_name + ' [%s#%s]' % (' ' * before, ' ' * after))
UnboundLocalError: local variable 'state_name' referenced before assignment
  File "./Andrew.py", line 423, in run
    settings = sublime.load_settings('Andrew.sublime-settings')
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)

Comments (2)

  1. 2

    Same issue here. I looked into the code and the ST2 documentation and found that probabile it is not possible to call most of the ST2 API functions in threads. Looking at the ST2 forum I also came across to this function:

    sublime_plugin.run_timed_function
    

    which, however, is not documented. (and opened a topic asking information about that http://www.sublimetext.com/forum/viewtopic.php?f=6&t=12071) I tried it and it seems working. In the next days I'll try it in the Andrew plugin (I think that some parts have to be restructure since I can't "run commands")

  2. Log in to comment