Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snippet stop working after extension:Python installed #13980

Closed
gainskills opened this issue Oct 19, 2016 · 17 comments
Closed

snippet stop working after extension:Python installed #13980

gainskills opened this issue Oct 19, 2016 · 17 comments
Labels
info-needed Issue requires more information from poster

Comments

@gainskills
Copy link

gainskills commented Oct 19, 2016

  • VSCode Version: Code 1.6.1 (9e4e44c, 2016-10-13T16:21:53.542Z)
  • OS Version: Windows_NT ia32 10.0.14393, windows 10 Pro 1607 x64
  • Extensions: donjayamanne.python-0.4.2, magicstack.MagicPython-0.5.17, ms-vscode.PowerShell-0.7.2, tht13.python-0.2.3, tushortz.python-extended-snippets-0.0.1

Steps to Reproduce:

  1. Install VS code on D: drive which is not OS drive
  2. snippet works before I install the extension: python-0.4.2
  3. my python path is D:/Program Files (x86)/python3.5/python.exe, and I configured setting item:
    "python.pythonPath": ""D:/Program Files (x86)/python3.5/python.exe""
  4. Snippet stops to work after I install the extension: python-0.4.2 : the snippet doesn't pop up anymore.

Expectation:
Snippet should works after I install the extension: python-0.4.2.

More info:
I installed the extension/VSCode on a server which OS is windows 2008 R2 and python path is 'C:/Python34/python.exe', snippet works well.

I have opened an issue for Python extension, the author doubt that this is a VSCode issue, I would like to provide more info to locate the root cause.

Thanks,

@roblourens
Copy link
Member

Could it be related to the tushortz.python-extended-snippets-0.0.1 extension? Does it work if you uninstall that extension?

@roblourens roblourens added the info-needed Issue requires more information from poster label Oct 19, 2016
@gainskills
Copy link
Author

gainskills commented Oct 20, 2016

@roblourens snippet works after I uninstalled the extension: Python.

@roblourens
Copy link
Member

'the extension' meaning the snippet one that I mentioned? Please file an issue on them.

@roblourens roblourens added invalid Issue identified as not relevant or not valid and removed info-needed Issue requires more information from poster labels Oct 20, 2016
@gainskills
Copy link
Author

@roblourens Thanks,
I have reported an issue on the extension. The author @DonJayamanne doubts this is an issue of VSCode.
Where I can find the log about snippet?
Thanks,

@roblourens
Copy link
Member

I see you edited your comment, so it works if you uninstall Don's Python extension? Can you post the snippet?

@roblourens roblourens reopened this Oct 20, 2016
@roblourens roblourens added info-needed Issue requires more information from poster and removed invalid Issue identified as not relevant or not valid labels Oct 20, 2016
@gainskills
Copy link
Author

gainskills commented Oct 20, 2016

snippet stops working totally, it doesn't pop up anymore.
I'll confirm with @DonJayamanne to see if autocomplete function of the extension: Python affected snippet.
Also, what is the meaning of 'post the snippet'?
Thanks again,

@DonJayamanne
Copy link
Contributor

@hanbaobao2005 , please could you confirm that auto complete doesn't work for JavaScript, HTML and TypeScript. You mentioned (https://github.com/DonJayamanne/pythonVSCode/issues/397#issuecomment-254740368) that this was the case.
Meaning, this is not an issue with an extension, but a VS Code issue.

@gainskills
Copy link
Author

gainskills commented Oct 20, 2016

I did the testing again (Extension version is 0.5.0).
I captured a gif about the issue:
test

  1. New a file and set the language mode to javascript
    or
    open a .js file, snippet works well
  2. New a file and set the language mode to html
    or
    open a .html file, snippet works well
    Note: Sorry about Open Source VS Code #1 and gulp-symdest does not preserve links on electron #2, the result is a different one, I'm not sure if I entered the right keywords to trigger snippet.
  3. Open a Py file, the snippet doesn't work
  4. New a file and set the language mode to Python, snippet works well.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Oct 20, 2016

@hanbaobao2005 please confirm that snippets work for other os. You mentioned this was the case on the other thread.

Also for the snippet to work yiu need to enter another space after selecting the snippet.

Could you try the another snippet , try/finally?

@gainskills
Copy link
Author

gainskills commented Oct 20, 2016

@DonJayamanne snippets works on my win2008R2 x64 Enterprise edition, attached the gif
BTW, I would say that snippet should works in real time, extra space is not needed:
OS: win2008R2 x64
test

try/finally still doesn't work on my win10, attached gif (Untitled-1 is created by Ctrl+N, test.py is a opened file):
test1
Thanks,

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Oct 20, 2016

@hanbaobao2005 , you are not selecting the snippet.
In the above screen, you are selecting the auto complete.
The icons for auto complete is different from the snippet.
The icon for snippets is a simple square. The ones for an autocomplete is one with multiple lines.
I.e. this isn't an issue. You're selecting auto complete, and not the snippet.

My suggestion:

  • Create a python file and try this once again.

Have a look below. Basically you're selecting the wrong item.
Once again, if it is a snippet you can see the title under the item (see below).
snippet

@gainskills
Copy link
Author

@DonJayamanne my issue is not about item selection, but when a opened a .py file, the snippet doesn't pop up.

@DonJayamanne
Copy link
Contributor

@hanbaobao2005 apologies for not understanding the issue.
It leads me to believe that the extension may not have been installed correctly.
You've mentioned that it works on one os (win2008R2 x64 Enterprise edition) and not the other.

Please try uninstalling the Python extension and trying again. There's nothing OS specific with snippets.

OS Version: Windows_NT ia32 10.0.14393

Is this Windows 7 , 8 or 2000? Thanks

@gainskills
Copy link
Author

@DonJayamanne,
I tried to uninstall/install the extension several times, it doesn't help.
My OS is windows 10 Pro 1607 x64, I could provide a remote access by team viewer for debugging.
Really appreciate your patient.
Thanks,

@DonJayamanne
Copy link
Contributor

Will do, Let's close this issue and reopen the one on the vs code python repo.

@DonJayamanne
Copy link
Contributor

@roblourens
FYI - Problem was settings.json was configured incorrectly and caused extension not to load correctly.

@roblourens
Copy link
Member

Thanks Don!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants