question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete not working for Autodesk Maya 2018

See original GitHub issue

From @monkeez on September 24, 2017 9:54

Environment data

VS Code version: 1.17.0-insider (f7962f0682a76516df51de4856f8ccc5d8ad578a) Python Extension version: 0.7.0 Python Version: 2.7.11 (Maya’s custom version, mayapy.exe) OS and version: Windows 10

My settings.json:

{
    "editor.acceptSuggestionOnEnter": "off",
    "editor.fontFamily": "Fira Mono, Consolas, 'Courier New', monospace",
    "python.autoComplete.extraPaths": [
        "C:/Program Files/Autodesk/Maya2018/devkit/other/pymel/extras/completion/py"
    ],
    "python.pythonPath": "C:/Program Files/Autodesk/Maya2018/bin/mayapy.exe"
}

Actual behavior

Autocomplete is not using the extraPaths as there are modules that already exist with the same names in the interpreter’s site-packages directory.

image

Expected behavior

I don’t mean to be rude by comparing this to other editors, but it’s the easiest way to show what should be happening.

In PyCharm it is possible to remove the site-packages directory from the mayapy.exe interpreter and use the extra paths provided for code completion. Is it possible to get this kind of functionality in pythonVSCode?

image

Whereas in Sublime with the Anaconda package, it works if you set the interpreter to mayapy.exe and add the completion directory to the extra paths. I suppose it’s using the extra paths before the site-packages, or it’s able to use both at the same time without conflict.

image

Steps to reproduce:

n/a

Logs

Output from Python output panel

Output from Console window (Help->Developer Tools menu)

Copied from original issue: DonJayamanne/pythonVSCode#1236

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
monkeezcommented, Mar 19, 2018

Sorry for the lack of response, but I can verify this is now working for me as of the most recent extension update. I just wanted to say thank you!

0reactions
brettcannoncommented, Jan 29, 2018

@monkeez can you provide your settings.json configuration along with any Logs info as requested in the new issue template?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Autocomplete not working for Autodesk Maya 2018 #186
In PyCharm it is possible to remove the site-packages directory from the mayapy.exe interpreter and use the extra paths provided for code ......
Read more >
How to configure Visual Studio Code for Maya 2019?
Autocomplete works perfectly for me too. The problem is only with Pylint. I have also tried. PYTHONPATH=C:\\Program Files\\Autodesk\\Maya2018\\ ...
Read more >
Solved: Maya Python API 2.0 - IDE Code Complete
Solved: I'm attempting to get my Python IDE (PyCharm) to code complete Maya Python API 2.0 objects. Since I'm working in the mayapy.exe ......
Read more >
Maya 2018 Windows 10 Home: Can not bring up Script Editor
Solved: Hey all I just installed Maya 2018 at work and the script editor comes up small, missing buttons, and missing file menu...
Read more >
Image Sequences are not working in Maya 2018
this problem has a simple solution as maya faces some issues in reading the image sequences starting with numbers, it means that your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found