In backend `table_handlers/table_tools.py` the function `export_subset()` has many undefined variables.