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

adding constant as first param disables other params in UI

Open yosefy opened this issue 4 years ago • 3 comments

{
  "name": "AAAAA",
  "constant": true,
  "type": "text",
  "env_var": "MY_USER",
  "default": "${auth.username}"
}

Aug 05 16:14:49 prod-mgmt-001 python3[29327]: 2021-08-05 16:14:49,640 [asyncio.ERROR] Future exception was never retrieved Aug 05 16:14:49 prod-mgmt-001 python3[29327]: future: <Future finished exception=TypeError("'NoneType' object does not support item assignment",)> Aug 05 16:14:49 prod-mgmt-001 python3[29327]: Traceback (most recent call last): Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run Aug 05 16:14:49 prod-mgmt-001 python3[29327]: result = self.fn(*self.args, **self.kwargs) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/web/script_config_socket.py", line 114, in _set_parameter_value Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self.config_model.set_param_value(parameter, value) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/model/script_config.py", line 93, in set_param_value Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self.parameter_values[param_name] = value Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/react/properties.py", line 157, in setitem Aug 05 16:14:49 prod-mgmt-001 python3[29327]: observer(key, old_value, item) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/model/script_config.py", line 335, in _value_changed Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self._reload() Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/model/script_config.py", line 360, in _reload Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self._value_property.set(self.value) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/react/properties.py", line 25, in set Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self._set_internal(new_value) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/react/properties.py", line 36, in _set_internal Aug 05 16:14:49 prod-mgmt-001 python3[29327]: observer(old_value, new_value) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/react/properties.py", line 48, in binder Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self._set_internal(value) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/react/properties.py", line 36, in _set_internal Aug 05 16:14:49 prod-mgmt-001 python3[29327]: observer(old_value, new_value) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/model/script_config.py", line 80, in Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self._included_config_prop.subscribe(lambda old, new: self._reload(old)) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/model/script_config.py", line 163, in _reload Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self._reload_parameters(old_included_config) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/model/script_config.py", line 210, in _reload_parameters Aug 05 16:14:49 prod-mgmt-001 python3[29327]: self.parameters.append(parameter) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/react/properties.py", line 72, in append Aug 05 16:14:49 prod-mgmt-001 python3[29327]: observer.on_add(item, len(self.data) - 1) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/web/script_config_socket.py", line 157, in on_add Aug 05 16:14:49 prod-mgmt-001 python3[29327]: socket._send_parameter_event('parameterAdded', parameter_to_external(parameter)) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/web/script_config_socket.py", line 133, in _send_parameter_event Aug 05 16:14:49 prod-mgmt-001 python3[29327]: event = self._create_event(event_type, data) Aug 05 16:14:49 prod-mgmt-001 python3[29327]: File "src/web/script_config_socket.py", line 213, in _create_event Aug 05 16:14:49 prod-mgmt-001 python3[29327]: data['clientStateVersion'] = self._latest_client_state_version Aug 05 16:14:49 prod-mgmt-001 python3[29327]: TypeError: 'NoneType' object does not support item assignment

yosefy avatar Aug 05 '21 16:08 yosefy

Thanks for reporting!

bugy avatar Aug 06 '21 07:08 bugy

Hi @yosefy, I believe you are using included config, are you? And constant is added there I managed to reproduce the bug by having included config

Fixed now

bugy avatar Aug 29 '21 14:08 bugy

Yes thank you

On Sun, Aug 29, 2021, 5:06 PM Iaroslav Shepilov @.***> wrote:

Hi @yosefy https://github.com/yosefy, I believe you are using included config, are you? And constant is added there I managed to reproduce the bug by having included config

Fixed now

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bugy/script-server/issues/479#issuecomment-907797358, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCXF3JYTQCDU2BZT7SG33TT7I5FRANCNFSM5BUFYHRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

yosefy avatar Aug 29 '21 19:08 yosefy