AttributeError: 'NoneType' object has no attribute 'endswith'
ybogdanov opened this issue · comments
Yuriy Bogdanov commented
Hi, I'm getting the following error in ST console when press cmd+alt+p, autocomplete seems not work either.
Traceback (most recent call last):
File "./sublime_plugin.py", line 362, in run_
File "./sublimerl_core.py", line 331, in run
if SUBLIMERL.initialized == False:
File "./sublimerl_function_search.py", line 103, in run_command
search.show()
File "./sublimerl_function_search.py", line 48, in show
self.set_search_completions()
File "./sublimerl_function_search.py", line 58, in set_search_completions
searches_filepath = os.path.join(SUBLIMERL.plugin_path, "completion", "Current-Project.searches")
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/posixpath.py", line 67, in join
elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
Maybe it's because I'm doing it not within a project?
ST2 Build 2220
OSX 1.8.2
Python 2.7.2
SublimErl 0.5.1
Yuriy Bogdanov commented
Error when saving .erl file:
Traceback (most recent call last):
File "./sublime_plugin.py", line 190, in on_post_save
File "./sublime_plugin.py", line 154, in run_timed_function
File "./sublime_plugin.py", line 189, in <lambda>
File "./sublimerl_autocompiler.py", line 86, in on_post_save
autocompiler = SublimErlAutocompiler(view)
File "./sublimerl_autocompiler.py", line 40, in __init__
SublimErlProjectLoader.__init__(self, view)
File "./sublimerl_core.py", line 224, in __init__
self.set_app_name()
File "./sublimerl_core.py", line 259, in set_app_name
src_path = os.path.join(self.test_root, 'src')
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/posixpath.py", line 67, in join
elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
Yuriy Bogdanov commented
Ah, got it, it was because of incorrect directory layout.
But autocomplete still not working http://o7.no/ZCSfNQ
Andy Till commented
rebar clean compile
and then a restart of sublime text fixed auto complete for me.