script-sync icon indicating copy to clipboard operation
script-sync copied to clipboard

No update on `RunScript()` params from the component clicking

Open 9and3 opened this issue 1 year ago • 3 comments

Since (8.8.24170.13001, 2024-06-18) Rhino update the component is not updating the RunScript() params when clicking on the component.

image

9and3 avatar Jul 11 '24 21:07 9and3

Possibly tracked the issue and posted in McNeel forum:

Hello there!

I wonder if this is a bug, while using a grasshopper python I noticed that if we dynamically add some inputs

862f347bcc2f1211a7c01cb1fb2038a0d2d891f5

But if the RunScript() def as columned parameters (it might be convinient sometimes to use it) it doesn't automatically update and throws an error 1. Error running script (ExecuteException): RunScript() takes 3 positional arguments but 4 were given:

ad95a3a29d32d12da305e49e9f1afbb0cda33ae6_2_1035x225

Hence, if you are using lists as datatype input the IDE will organize automatically the RunScrip()'s parameters in column resaulting the above mentioned error, see here:

9d6f840f9ddc3e5b5263b8d1851b82be272605c1_2_1035x432

it happens since 8.8.24170.13001, before this behavior didn't exist. I know we can live with it but I just reported it in case.. thanks! :palms_up_together:

9and3 avatar Jul 15 '24 22:07 9and3

as a temp fix you can add manually the inputs in the lines 412:

    def RunScript(self,
        select_file: bool,
        packages_2_reload : list,
        x : int <-- new entries
    ):

9and3 avatar Jul 20 '24 14:07 9and3

Still keeping this one. On https://github.com/ibois-epfl/script-sync/commit/d72a542476d443500db2f9956a6140aa49b49dcd we introduce a temporary fix.

9and3 avatar Jul 20 '24 16:07 9and3