Python cannot import Adsk.core module

Python cannot import Adsk.core module

Anonymous
Not applicable
4,044 Views
2 Replies
Message 1 of 3

Python cannot import Adsk.core module

Anonymous
Not applicable

Hello guys. Sorry I didn't find a solution

I cannot run even simple test script. Here is screenshot:9a0597d4607a19298fa57743e19583a3

 

When I choose Edit in Scripts it doesnt run Visual Studio .Just nothing happends

4,045 Views
2 Replies
Replies (2)
Message 2 of 3

kandennti
Mentor
Mentor

Hi @Anonymous .

 

Is it VSCode launched from Fusion360?
I feel that the file path of python.exe is different.

 

Here will be helpful.
http://help.autodesk.com/view/fusion360/ENU/?guid=GUID-743C88FB-CA3F-44B0-B0B9-FCC378D0D782 

Currently, “ms-python.python” is recommended for Ver2019.9.34911. Don't forget.

 

 

An easy way to avoid the "ModuleNotFoundError: No module named 'adsk'" error is to add the path to sys.path.

1)Copy the value of "python.autoComplete.extraPaths" in the .vscode \ settings.json file.

1.png

 

2)Add the path before import adsk.core ~ .

import sys
sys.path.append (<Copied python.autoComplete.extraPaths value>)

2.png

Message 3 of 3

Anonymous
Not applicable

Ok I'll try that method.

Vscode was open manually because after clicking button Edit in Fusion 360 nothing happends

0 Likes