Your anonymized code includes the following statement
unified_callback = CustomJS(
args=dict(filter=filter, p=p,
controls_choice_show_toggle=controls_choice_show_toggle
), code=''' ''')
However, there is no quantity filter
defined. Moreover, filter
is a built-in function in Python 3, which is the source of the error you are seeing, I believe. See https://docs.python.org/3/library/functions.html
I hope this helps.
J