You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a setup where an app includes another module. To make the app slim, all major functions are located in that included module. Therefore I handover self as function call parameter and is used as iself in the modules code. This works flawless like for logging. But it breaks when using listeners with custom arguments (kwargs) at the end, see the examples:
Docs does not state any limitations with respect to the type of the value of the named argument, therefore this is either a bug or the docs need to be more precise about the value types allowed.
Version
4.4.2
Installation type
Docker container
Relevant log output
When using an object as kwarg value, this error raises:
Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/appdaemon/events.py", line 249, in process_event mydata = deepcopy(data) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/usr/local/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/usr/local/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/usr/local/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/usr/local/lib/python3.10/copy.py", line 271, in _reconstruct state = deepcopy(state, memo) File "/usr/local/lib/python3.10/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/local/lib/python3.10/copy.py", line 231, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/lib/python3.10/copy.py", line 161, in deepcopy rv = reductor(4) TypeError: cannot pickle '_thread.RLock' object
Relevant code in the app or config file that caused the issue
What happened?
I have a setup where an app includes another module. To make the app slim, all major functions are located in that included module. Therefore I handover
self
as function call parameter and is used asiself
in the modules code. This works flawless like for logging. But it breaks when using listeners with custom arguments (kwargs) at the end, see the examples:Docs does not state any limitations with respect to the type of the value of the named argument, therefore this is either a bug or the docs need to be more precise about the value types allowed.
Version
4.4.2
Installation type
Docker container
Relevant log output
When using an object as kwarg value, this error raises:
Relevant code in the app or config file that caused the issue
Works
Works
Fails
The text was updated successfully, but these errors were encountered: