The user reported they had changed their data flow to use a Transform node and it was no longer a problem so there was no definitive root cause for the original issue.
However, this error can be generated if the metadata for the input data set contains multi-byte Unicode characters. Check each of the field names for special characters and punctuation characters. Data sourced from sources such as spreadsheets may contain problematic characters, e.g. these are ‘smart’ quotation characters rather than straight 'single quote' characters.
The Modify Fields node can be used to rename fields that contain problem characters.