Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Syntax Error when using the new template.py #90

Open
TotalKrill opened this issue Nov 9, 2016 · 7 comments
Open

Syntax Error when using the new template.py #90

TotalKrill opened this issue Nov 9, 2016 · 7 comments

Comments

@TotalKrill
Copy link

TotalKrill commented Nov 9, 2016

6f044a6 breaks with syntax error on line 43 in template.py after running YcmGenerateConfig on a project

@rdnetto
Copy link
Owner

rdnetto commented Nov 10, 2016

Can you explain how it's breaking? It has a syntax error in Python 3 (not 2), but my understanding was the YCM uses Python 2 anyway.

Also, what's the output of python --version on your OS?

@TotalKrill
Copy link
Author

TotalKrill commented Nov 14, 2016

The output of python --version is 2.7.12, but this is because i set it manually to 2.7. I usually switch between 3.5 and 2.7 because many programs i use are not checking the python version.

The crash occurs when i try to use YcmCompleter GoTo

@TotalKrill
Copy link
Author

Also, when I build ycm, it uses python 3.5

@ssfdust
Copy link
Contributor

ssfdust commented Nov 25, 2016

Hi I made a temporary patch for this syntax problem, though I don't think it's perfect.
Maybe you can try it.Good luck : )
ssfdust@15b2806

@TotalKrill
Copy link
Author

Still getting the same error. This is my build command for YouCompleteMe with some info:

./install.py --clang-completer --system-libclang
Searching Python 3.5 libraries...
Found Python library: /usr/lib/python3.5/config-3.5m/libpython3.5m.so
Found Python headers folder: /usr/include/python3.5m
... Detecting stuff ...
Your C++ compiler supports C++11, compiling in that mode.
-- Found PythonLibs: /usr/lib/python3.5/config-3.5m/libpython3.5m.so (found suitable version "3.5.2", minimum required is "3.3") 
Using libclang to provide semantic completion for C/C++/ObjC
Using external libclang: /usr/lib/libclang.so.3.9
-- Found PythonInterp: /usr/bin/python3.5 (found version "3.5.2") 
... Looking for stuff ...
-- Build files have been written to: /tmp/ycm_build_t4c4uxn1

I think this means that i am using the python3.5 for Ycm, but i still get the syntax error in the function LoadSystemIncludes. If i remove this and all references to it. It works.

@TotalKrill
Copy link
Author

TotalKrill commented Nov 28, 2016

Oh, nevermind. Will try your version, I falsely assumed it had been merged.

Edit: Your patch seems to be working @ssfdust

@korken89
Copy link

I am having the same problem as @TotalKrill, @ssfdust patch fixes the problem when using python3.

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

No branches or pull requests

4 participants