A colleague was able to figurafigure out the issue: some options, for an unknown, had an empty value u'' in the values2 list. That was the problem, because the ArcGIS wouldnt recognize this empty as a valid item for the filter list, and returned an error.
We
We added a piece of code to remove these empty values that would appear in some options, and everything worked out.