Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"DLL load failed: The specified module could not be found" during debugging

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
manharXEA2X
1225 Views, 9 Replies

"DLL load failed: The specified module could not be found" during debugging

I've been trying to debug my Add-in for quite a while now. A month ago, the debug system was running as it was supposed to, however, if I include a breakpoint and try debugging on the VS Code editor, it shows up the error message I  have written above. An image is attached for more details. I tried rolling back to earlier versions as per this post, however that didn't work either. Any help would be greatly appreciated. I don't have a background in programming so if you need any other information, please ask for what else I need to supply and where I can find it. TIA!

error.PNG 

9 REPLIES 9
Message 2 of 10
j.han97
in reply to: manharXEA2X

Hi @manharXEA2X ,

 

Could you go to the path of the core.py file and check if there is a _core.pyd file? The path should be similar to this: C:\Users\{username}\AppData\Local\Autodesk\webdeploy\production\1a27f23c10bc87f7eab1f89e440a46f886b5f544\Api\Python\packages\adsk\. (Or just copy the path in the error message)

 

Also, have you updated to the latest version (v2.0.11894)?

Message 3 of 10
manharXEA2X
in reply to: manharXEA2X

Hi @j.han97 ,

Yes that file did exist in the same folder. I thought an _init_.py file was required too so I added that as well, no dice. Also, yes I have that exact version of Fusion 360 installed. 

Message 4 of 10
j.han97
in reply to: manharXEA2X

Hi @manharXEA2X ,

 

Due to my limited knowledge, all I could recommend is to reinstall Fusion 360. Aside from that, seeking for help in Support forum is another option.

Message 5 of 10
manharXEA2X
in reply to: manharXEA2X

Thanks, I'll leave the question open, because the problem has persisted across different computers I have tried to use, as well as re-installations. Thanks for the comment! (Liked your reference)

Message 6 of 10
kitiv94002
in reply to: manharXEA2X

I also have the same problem. It first accured when i tried to debugg the "hello world" script. After a while of fruitless tries to make it work i switched to debugg an existing script (ElectronicsPackageGenerator). That surprisingly worked... for a while... After returning to the newly created skript now both have this problem.

 

Any help would be appreciated

(I already checked and made sure i have the _core.pyd file and the Autodesk Version  2.0.11894)

Message 7 of 10
manharXEA2X
in reply to: kitiv94002

Hi @kitiv94002 ,

 

I actually came across the solution not too long ago. It's really simple, actually. The DLL lookup fails because the script is not running while it tries to execute the files. What you want to do is Run and Debug (or press F5) to make it read through the links in the .pyd file. What I tried to do (and I assume you're doing it as well) is syntactical-debugging (clicking on the debug symbol under the run symbol in the right hand upper corner) which doesn't really run the code and make it access all the files it wants to. It's even given in the help page (attached). This works for me, let me know if it doesn't for you and I can help you walk through it.

manharXEA2X_0-1642025894219.png

 

Message 8 of 10
kitiv94002
in reply to: manharXEA2X

Hello @manharXEA2X,
yes, thank you so much! That really "fixed" the problem. 

Hours of error searching for simply pressing the wrong button...

Message 9 of 10

I had a bit of trouble with that also. My son Paul helped me out.
in Fusion 360 select edit to open the code in Visual Studio.

in Visual Studio press F5 to enter debug mode... place a stop somewhere if you wish..

in Fusion now hit the run button. This will run in debug in visual studio... And stop where you placed the red dot.

 

 

Message 10 of 10

I had a bit of trouble with that also. My son Paul helped me out.
in Fusion 360 select edit to open the code in Visual Studio.

in Visual Studio press F5 to enter debug mode... place a stop somewhere if you wish..

in Fusion now hit the run button. This will run in debug in visual studio... And stop where you placed the red dot.

 

Note that if you stop debugg mode in VSCode using the unplug button (orange below), then running from Fusion will still stop on your red dots and probably stay frozen forever...Capture d’écran 2022-03-23 122359.png

You need to press "alt" with the mouse on the button to turn it into a square and stop properly.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report