Stops working after "local variable 'source' referenced before assignment"
Closed this issue · 3 comments
atombender commented
Apparently after this happens, NodeRequirer suddenly stops responding to its shortcut:
reloading plugin NodeRequirer.NodeRequirer
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 74, in reload_plugin
m = importlib.import_module(modulename)
File "./importlib/__init__.py", line 90, in import_module
File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/NodeRequirer/NodeRequirer.py", line 7, in <module>
from NodeRequirer.src import utils
File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 678, in load_module
exec(compile(source, source_path, 'exec'), mod.__dict__)
UnboundLocalError: local variable 'source' referenced before assignment
Disabling and enabling the package fixes the issue.
This is Sublime dev build 3092.
atombender commented
I just realized this occurs every time Sublime starts up. Any ideas, @ganemone?
ganemone commented
Sorry about the delay, are you still having issues with version 1.0.0? I haven't been able to replicate the issue,
atombender commented
Apparently it's a Sublime Text issue. I used the workaround described here.