An error message occurred when I closed the PythonScript

When the simulation is running and I close the PythonScript(add during Modeling),these error messages will appear.
But close the ConfigScript that with the components in the eCatalog will not have such an error.

1 Like

If you try to reopen the Python script you was working on after that message came out, won’t it open? Or save via ctrl+s, will VC not be forced to shut down?

After that, the script cannot be opened unless visualComponent is restarted

It says, “Cannot assign script code while executing,” so I’m guessing you are trying to edit the Python code while the simulation is running.
You should only edit scripts and other behaviors when the simulation is reset.

I didn’t do any editing. I just opened it, checked it for a while and then closed the Script.
and not all scripts have this error, And this problem didn’t exist before 4.9 either on my side

I also found that problem while using version 4.10.
If you edit Python and close the script window after compiling it while the simulation is not running, the Python script will not open after the error message appears.
If there was no luck, VC was forced to shut down when saving by pressing the non-compiled Ctrl+s key.
Before compiling, the script window had a * mark at the top of it and this always happened if it didn’t disappear even after compiling.
I haven’t found a solution yet either…