Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding constant as first param disables other params in UI #479

Closed
yosefy opened this issue Aug 5, 2021 · 3 comments
Closed

adding constant as first param disables other params in UI #479

yosefy opened this issue Aug 5, 2021 · 3 comments

Comments

@yosefy
Copy link

yosefy commented Aug 5, 2021

{
  "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

@bugy bugy added the bug label Aug 6, 2021
@bugy
Copy link
Owner

bugy commented Aug 6, 2021

Thanks for reporting!

@bugy
Copy link
Owner

bugy commented Aug 29, 2021

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 bugy added the resolved label Aug 29, 2021
@bugy bugy added this to the 1.17.0 milestone Aug 29, 2021
@yosefy
Copy link
Author

yosefy commented Aug 29, 2021 via email

@bugy bugy closed this as completed Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants