techartorg / MXSPyCOM

A modern version of MXSCOM, to allow for editing & execution of 3ds Max MaxScript and Python files from external code editors.
MIT License
176 stars 23 forks source link

System.ArgumentNullException: Value cannot be null. (Parameter 'type') #20

Open arhymingape opened 2 years ago

arhymingape commented 2 years ago

Hi, I am getting the following error when running the task on the provided hello world maxscript file. Am using VSCode 1.64.2, 3DS Max 2020.

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'type')
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath)
   at MXSPyCOM.Program.Main(String[] args)
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command & 'C:\Program Files\MXSPyCOM\MXSPyCOM.exe' -s c:\[PATH_TO_MAXSCRIPT]" terminated with exit code: 1.
JeffHanna commented 2 years ago

c:\[PATH_TO_MAXSCRIPT]

MXSPyCOM is being provided that as the path to the script file you are trying to run. That's not a valid path to a file.

arhymingape commented 2 years ago

Hey Jeff, Sorry, should have mentioned I just replaced that part manually before pasting in here as it was a long path.

I tried hard coding the path in the json file and also tried it with the workspace in the User directory.

Still get the error. Saw some closed issues with similar error but wasn't able to get much of a clue from it. Any thoughts?

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'type') at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath) at MXSPyCOM.Program.Main(String[] args) The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command & 'C:\Program Files\MXSPyCOM\MXSPyCOM.exe' -s c:\Users\arhymingape\maxscript\hello_world.ms" terminated with exit code: 1.

BigBrotherLi commented 2 years ago

same issue!

OkeniteOwner commented 1 year ago

Hello, i get the same issue with VSCode : Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'type') at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath) at MXSPyCOM.Program.Main(String[] args)

Did someone found a solution ? Thanks by advance

zhoulong commented 1 year ago

Put initialize_COM_server.ms into [install path]/scripts/Startup folder. Then restart 3dsmax.