pl-ca / ClangAutoComplete

Sublime Text 3 plugin that offers auto-completion of C/C++ structure members or class attributes and methods.
46 stars 6 forks source link

Completion raises an error on re.sub() #29

Open dzarda opened 8 years ago

dzarda commented 8 years ago

I came across this while setting up ClangAutoComplete with Sublime 3114. The following exception is thrown on each completion.

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 377, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "C:\Users\Dzarda\AppData\Roaming\Sublime Text 3\Packages\ClangAutoComplete\ClangAutoComplete.py", line 105, in on_query_completions
    self.load_settings()
  File "C:\Users\Dzarda\AppData\Roaming\Sublime Text 3\Packages\ClangAutoComplete\ClangAutoComplete.py", line 86, in load_settings
    include_dir = re.sub("(\$project_base_path)", project_path, include_dir)
  File "./python3.3/re.py", line 170, in sub
  File "./python3.3/re.py", line 309, in _subx
  File "./python3.3/re.py", line 296, in _compile_repl
  File "./python3.3/sre_parse.py", line 801, in parse_template
sre_constants.error: missing group name

Of course, when I set the include_dir to an empty string, the error disappears, though so does the functionality.

I have a suspicion that this might be a bug in Python, since I found a similar issue had been resolved regarding Python 2 here

pl-ca commented 8 years ago

I'll be honest and say that I have no idea what is causing this. What platform are you running this on?

dzarda commented 8 years ago

Windows 7 64bit